diff --git a/src/servers/app/ServerWindow.cpp b/src/servers/app/ServerWindow.cpp index b6c990e227..1b3b69d918 100644 --- a/src/servers/app/ServerWindow.cpp +++ b/src/servers/app/ServerWindow.cpp @@ -2149,7 +2149,6 @@ ServerWindow::HandleDirectConnection(int bufferState, int driverState) BRegion exclude = const_cast(border->VisibleRegion()); clipRegion.Exclude(&exclude); - border->ConvertToScreen(&clipRegion); fDirectWindowData->direct_info->clip_list_count = min_c(clipRegion.CountRects(), kMaxClipRectsCount); fDirectWindowData->direct_info->clip_bounds = clipRegion.FrameInt(); diff --git a/src/servers/app/WinBorder.cpp b/src/servers/app/WinBorder.cpp index 7d2e6c3b84..777493cd19 100644 --- a/src/servers/app/WinBorder.cpp +++ b/src/servers/app/WinBorder.cpp @@ -187,6 +187,7 @@ WinBorder::MoveBy(float x, float y) // it's not, as also the mouse movement is driven by rootlayer. // Find some way to call DirectConnected() from the ServerWindow's thread, // by sending a message from here or whatever. + // (Tested with BeSnes9x and works fine, though) Window()->HandleDirectConnection(B_DIRECT_STOP); if (GetRootLayer()->Lock()) { @@ -246,15 +247,21 @@ WinBorder::ResizeBy(float x, float y) // this method can be called from a ServerWindow thread or from a RootLayer one, // so lock - if (GetRootLayer() && GetRootLayer()->Lock()) { - fRebuildDecRegion = true; + if (GetRootLayer()) { + Window()->HandleDirectConnection(B_DIRECT_STOP); + + if (GetRootLayer()->Lock()) { + fRebuildDecRegion = true; - if (fDecorator) - fDecorator->ResizeBy(x, y); + if (fDecorator) + fDecorator->ResizeBy(x, y); - Layer::ResizeBy(x, y); + Layer::ResizeBy(x, y); - GetRootLayer()->Unlock(); + GetRootLayer()->Unlock(); + } + + Window()->HandleDirectConnection(B_DIRECT_START|B_BUFFER_RESIZED); } else { if (fDecorator) fDecorator->ResizeBy(x, y);