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:
Stephan Aßmus 2006-02-09 15:07:56 +00:00
parent d365e2039e
commit ebae3c7d61
2 changed files with 15 additions and 10 deletions

View File

@ -31,6 +31,7 @@
#include <WindowInfo.h>
#include <ServerProtocol.h>
#include <DirectWindow.h>
#include <Entry.h>
#include <Message.h>
#include <MessageFilter.h>
@ -1274,16 +1275,20 @@ Desktop::MoveWindowBy(WindowLayer* window, float x, float y)
if (!LockAllWindows())
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()) {
window->MoveBy(x, y);
UnlockAllWindows();
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;
_RebuildClippingForAllWindows(background);
@ -1300,6 +1305,10 @@ Desktop::MoveWindowBy(WindowLayer* window, float x, float y)
GetDrawingEngine()->CopyRegion(&copyRegion, 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
// could move by blitting
copyRegion.OffsetBy(x, y);

View File

@ -309,14 +309,10 @@ WindowLayer::MoveBy(int32 x, int32 y)
if (x == 0 && y == 0)
return;
fWindow->HandleDirectConnection(B_DIRECT_STOP);
fFrame.OffsetBy(x, y);
_PropagatePosition();
fWindow->HandleDirectConnection(B_DIRECT_START | B_BUFFER_MOVED);
// take along the dirty region which have not
// take along the dirty region which is not
// processed yet
fDirtyRegion.OffsetBy(x, y);