diff --git a/src/servers/app/ServerWindow.cpp b/src/servers/app/ServerWindow.cpp index 9d25a8bd0b..31a3e8e149 100644 --- a/src/servers/app/ServerWindow.cpp +++ b/src/servers/app/ServerWindow.cpp @@ -1787,8 +1787,10 @@ fDesktop->LockSingleWindow(); BRegion empty; fLink.AttachRegion(empty); } else { - BRegion drawingRegion = fCurrentView->LocalClipping(); - fLink.AttachRegion(drawingRegion); + _UpdateCurrentDrawingRegion(); + BRegion region(fCurrentDrawingRegion); + fCurrentView->ConvertFromScreen(®ion); + fLink.AttachRegion(region); } fLink.Flush(); @@ -2047,11 +2049,7 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code, BPrivate::LinkReceiver &li return; } - if (!fCurrentDrawingRegionValid || fWindow->DrawingRegionChanged(fCurrentView)) { - fWindow->GetEffectiveDrawingRegion(fCurrentView, fCurrentDrawingRegion); - fCurrentDrawingRegionValid = true; - } - + _UpdateCurrentDrawingRegion(); if (fCurrentDrawingRegion.CountRects() <= 0) { if (link.NeedsReply()) { // the client is now blocking and waiting for a reply! @@ -3181,6 +3179,18 @@ ServerWindow::_UpdateDrawState(View* view) } +void +ServerWindow::_UpdateCurrentDrawingRegion() +{ + if (!fCurrentDrawingRegionValid + || fWindow->DrawingRegionChanged(fCurrentView)) { + fWindow->GetEffectiveDrawingRegion(fCurrentView, + fCurrentDrawingRegion); + fCurrentDrawingRegionValid = true; + } +} + + bool ServerWindow::_MessageNeedsAllWindowsLocked(uint32 code) const { diff --git a/src/servers/app/ServerWindow.h b/src/servers/app/ServerWindow.h index e54b70e495..845d7252e6 100644 --- a/src/servers/app/ServerWindow.h +++ b/src/servers/app/ServerWindow.h @@ -128,6 +128,7 @@ private: void _SetCurrentView(View* view); void _UpdateDrawState(View* view); + void _UpdateCurrentDrawingRegion(); bool _MessageNeedsAllWindowsLocked(uint32 code) const;