this fixes Chart leaving dirty stars in BDirectWindow mode... at least on my machine. Looks like BDirectWindow resizing is notably smoother on Haiku btw. :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16311 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
#include <WindowInfo.h>
|
#include <WindowInfo.h>
|
||||||
#include <ServerProtocol.h>
|
#include <ServerProtocol.h>
|
||||||
|
|
||||||
|
#include <DirectWindow.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <Message.h>
|
#include <Message.h>
|
||||||
#include <MessageFilter.h>
|
#include <MessageFilter.h>
|
||||||
@@ -1274,16 +1275,20 @@ Desktop::MoveWindowBy(WindowLayer* window, float x, float y)
|
|||||||
if (!LockAllWindows())
|
if (!LockAllWindows())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// the dirty region starts with the visible area of the window being moved
|
|
||||||
BRegion newDirtyRegion(window->VisibleRegion());
|
|
||||||
|
|
||||||
window->MoveBy(x, y);
|
|
||||||
|
|
||||||
if (!window->IsVisible()) {
|
if (!window->IsVisible()) {
|
||||||
|
window->MoveBy(x, y);
|
||||||
UnlockAllWindows();
|
UnlockAllWindows();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// the dirty region starts with the visible area of the window being moved
|
||||||
|
BRegion newDirtyRegion(window->VisibleRegion());
|
||||||
|
|
||||||
|
// no more drawing for DirectWindows
|
||||||
|
window->ServerWindow()->HandleDirectConnection(B_DIRECT_STOP);
|
||||||
|
|
||||||
|
window->MoveBy(x, y);
|
||||||
|
|
||||||
BRegion background;
|
BRegion background;
|
||||||
_RebuildClippingForAllWindows(background);
|
_RebuildClippingForAllWindows(background);
|
||||||
|
|
||||||
@@ -1300,6 +1305,10 @@ Desktop::MoveWindowBy(WindowLayer* window, float x, float y)
|
|||||||
|
|
||||||
GetDrawingEngine()->CopyRegion(©Region, x, y);
|
GetDrawingEngine()->CopyRegion(©Region, x, 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(x, y);
|
copyRegion.OffsetBy(x, y);
|
||||||
|
|||||||
@@ -309,14 +309,10 @@ WindowLayer::MoveBy(int32 x, int32 y)
|
|||||||
if (x == 0 && y == 0)
|
if (x == 0 && y == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fWindow->HandleDirectConnection(B_DIRECT_STOP);
|
|
||||||
|
|
||||||
fFrame.OffsetBy(x, y);
|
fFrame.OffsetBy(x, y);
|
||||||
_PropagatePosition();
|
_PropagatePosition();
|
||||||
|
|
||||||
fWindow->HandleDirectConnection(B_DIRECT_START | B_BUFFER_MOVED);
|
// take along the dirty region which is not
|
||||||
|
|
||||||
// take along the dirty region which have not
|
|
||||||
// processed yet
|
// processed yet
|
||||||
fDirtyRegion.OffsetBy(x, y);
|
fDirtyRegion.OffsetBy(x, y);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user