GetClippingRegion() was implemented wrongly on the app_server side. It needs

to take the current effective drawing region of the view, but converted to
local coordinate space. Untested as of yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24361 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-03-11 17:38:26 +00:00
parent 17959555c2
commit 97d6a0515e
2 changed files with 18 additions and 7 deletions

View File

@ -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(&region);
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
{

View File

@ -128,6 +128,7 @@ private:
void _SetCurrentView(View* view);
void _UpdateDrawState(View* view);
void _UpdateCurrentDrawingRegion();
bool _MessageNeedsAllWindowsLocked(uint32 code) const;