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:
@@ -1912,6 +1912,8 @@ Desktop::_ShowWindow(Window* window, bool affectsOtherWindows)
|
|||||||
void
|
void
|
||||||
Desktop::_HideWindow(Window* window)
|
Desktop::_HideWindow(Window* window)
|
||||||
{
|
{
|
||||||
|
window->ServerWindow()->HandleDirectConnection(B_DIRECT_STOP);
|
||||||
|
|
||||||
// after rebuilding the clipping,
|
// after rebuilding the clipping,
|
||||||
// this window will not have a visible
|
// this window will not have a visible
|
||||||
// region anymore, so we need to remember
|
// region anymore, so we need to remember
|
||||||
@@ -1927,8 +1929,6 @@ Desktop::_HideWindow(Window* window)
|
|||||||
_WindowChanged(window);
|
_WindowChanged(window);
|
||||||
|
|
||||||
MarkDirty(dirty);
|
MarkDirty(dirty);
|
||||||
|
|
||||||
window->ServerWindow()->HandleDirectConnection(B_DIRECT_STOP);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1981,10 +1981,6 @@ Desktop::MoveWindowBy(Window* window, float x, float y, int32 workspace)
|
|||||||
|
|
||||||
GetDrawingEngine()->CopyRegion(©Region, (int32)x, (int32)y);
|
GetDrawingEngine()->CopyRegion(©Region, (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
|
// in the dirty region, exclude the parts that we
|
||||||
// could move by blitting
|
// could move by blitting
|
||||||
copyRegion.OffsetBy((int32)x, (int32)y);
|
copyRegion.OffsetBy((int32)x, (int32)y);
|
||||||
@@ -1994,6 +1990,10 @@ Desktop::MoveWindowBy(Window* window, float x, float y, int32 workspace)
|
|||||||
_SetBackground(background);
|
_SetBackground(background);
|
||||||
_WindowChanged(window);
|
_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();
|
UnlockAllWindows();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2017,6 +2017,8 @@ Desktop::ResizeWindowBy(Window* window, float x, float y)
|
|||||||
// it is shrunk in "previouslyOccupiedRegion"
|
// it is shrunk in "previouslyOccupiedRegion"
|
||||||
BRegion previouslyOccupiedRegion(window->VisibleRegion());
|
BRegion previouslyOccupiedRegion(window->VisibleRegion());
|
||||||
|
|
||||||
|
window->ServerWindow()->HandleDirectConnection(B_DIRECT_STOP);
|
||||||
|
|
||||||
window->ResizeBy((int32)x, (int32)y, &newDirtyRegion);
|
window->ResizeBy((int32)x, (int32)y, &newDirtyRegion);
|
||||||
|
|
||||||
BRegion background;
|
BRegion background;
|
||||||
@@ -2035,6 +2037,8 @@ Desktop::ResizeWindowBy(Window* window, float x, float y)
|
|||||||
_SetBackground(background);
|
_SetBackground(background);
|
||||||
_WindowChanged(window);
|
_WindowChanged(window);
|
||||||
|
|
||||||
|
window->ServerWindow()->HandleDirectConnection(B_DIRECT_START | B_BUFFER_RESIZED);
|
||||||
|
|
||||||
UnlockAllWindows();
|
UnlockAllWindows();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -365,13 +365,9 @@ Window::ResizeBy(int32 x, int32 y, BRegion* dirtyRegion)
|
|||||||
if (x == 0 && y == 0)
|
if (x == 0 && y == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fWindow->HandleDirectConnection(B_DIRECT_STOP);
|
|
||||||
|
|
||||||
fFrame.right += x;
|
fFrame.right += x;
|
||||||
fFrame.bottom += y;
|
fFrame.bottom += y;
|
||||||
|
|
||||||
fWindow->HandleDirectConnection(B_DIRECT_START | B_BUFFER_RESIZED);
|
|
||||||
|
|
||||||
fBorderRegionValid = false;
|
fBorderRegionValid = false;
|
||||||
fContentRegionValid = false;
|
fContentRegionValid = false;
|
||||||
fEffectiveDrawingRegionValid = false;
|
fEffectiveDrawingRegionValid = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user