diff --git a/src/servers/app/ServerWindow.cpp b/src/servers/app/ServerWindow.cpp index 90e07ccfc1..aeecfcb4e1 100644 --- a/src/servers/app/ServerWindow.cpp +++ b/src/servers/app/ServerWindow.cpp @@ -2435,8 +2435,12 @@ ServerWindow::_HandleDirectConnection(int bufferState, int driverState) // TODO: Review this const int32 kMaxClipRectsCount = (B_PAGE_SIZE - sizeof(direct_buffer_info)) / sizeof(clipping_rect); - // TODO: Is this the correct region to take into account ? - BRegion clipRegion = const_cast(border->VisibleRegion()); + // TODO: Is there a simpler way to obtain this result ? + // We just want the region INSIDE the window, border excluded. + BRegion clipRegion = const_cast(border->FullVisible()); + BRegion exclude = const_cast(border->VisibleRegion()); + clipRegion.Exclude(&exclude); + border->ConvertToTop(&clipRegion); fDirectWindowData->direct_info->clip_list_count = min_c(clipRegion.CountRects(), kMaxClipRectsCount); fDirectWindowData->direct_info->clip_bounds = clipRegion.FrameInt();