Moved HandleDirectConnection From Window to Desktop. This should fix the

spurious off-window drawing of BDirectWindow. At least, it does here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32312 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2009-08-13 14:01:25 +00:00
parent ce98f98948
commit f98bacf6ca
2 changed files with 10 additions and 10 deletions

View File

@ -1912,6 +1912,8 @@ Desktop::_ShowWindow(Window* window, bool affectsOtherWindows)
void
Desktop::_HideWindow(Window* window)
{
window->ServerWindow()->HandleDirectConnection(B_DIRECT_STOP);
// after rebuilding the clipping,
// this window will not have a visible
// region anymore, so we need to remember
@ -1927,8 +1929,6 @@ Desktop::_HideWindow(Window* window)
_WindowChanged(window);
MarkDirty(dirty);
window->ServerWindow()->HandleDirectConnection(B_DIRECT_STOP);
}
@ -1981,10 +1981,6 @@ Desktop::MoveWindowBy(Window* window, float x, float y, int32 workspace)
GetDrawingEngine()->CopyRegion(&copyRegion, (int32)x, (int32)y);
// allow DirectWindows to draw again after the visual
// content is at the new location
window->ServerWindow()->HandleDirectConnection(B_DIRECT_START | B_BUFFER_MOVED);
// in the dirty region, exclude the parts that we
// could move by blitting
copyRegion.OffsetBy((int32)x, (int32)y);
@ -1994,6 +1990,10 @@ Desktop::MoveWindowBy(Window* window, float x, float y, int32 workspace)
_SetBackground(background);
_WindowChanged(window);
// allow DirectWindows to draw again after the visual
// content is at the new location
window->ServerWindow()->HandleDirectConnection(B_DIRECT_START | B_BUFFER_MOVED);
UnlockAllWindows();
}
@ -2017,6 +2017,8 @@ Desktop::ResizeWindowBy(Window* window, float x, float y)
// it is shrunk in "previouslyOccupiedRegion"
BRegion previouslyOccupiedRegion(window->VisibleRegion());
window->ServerWindow()->HandleDirectConnection(B_DIRECT_STOP);
window->ResizeBy((int32)x, (int32)y, &newDirtyRegion);
BRegion background;
@ -2035,6 +2037,8 @@ Desktop::ResizeWindowBy(Window* window, float x, float y)
_SetBackground(background);
_WindowChanged(window);
window->ServerWindow()->HandleDirectConnection(B_DIRECT_START | B_BUFFER_RESIZED);
UnlockAllWindows();
}

View File

@ -365,13 +365,9 @@ Window::ResizeBy(int32 x, int32 y, BRegion* dirtyRegion)
if (x == 0 && y == 0)
return;
fWindow->HandleDirectConnection(B_DIRECT_STOP);
fFrame.right += x;
fFrame.bottom += y;
fWindow->HandleDirectConnection(B_DIRECT_START | B_BUFFER_RESIZED);
fBorderRegionValid = false;
fContentRegionValid = false;
fEffectiveDrawingRegionValid = false;