convert the invalid rect to the top layer coords, Adi, an update message is only sent when a layer is the top layer in Layer::RequestDraw, I don't know how to fix this, but it would be nice to have BView::Invalidate working.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12398 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2005-04-15 00:31:39 +00:00
parent 0f757dc5df
commit 8770be761d
+4 -3
View File
@@ -1382,13 +1382,14 @@ cl->fBoundsLeftTop.PrintToStream();
{ {
DTRACE(("ServerWindow %s: Message AS_LAYER_INVAL_RECT: Layer: %s\n",fTitle.String(), cl->fName->String())); DTRACE(("ServerWindow %s: Message AS_LAYER_INVAL_RECT: Layer: %s\n",fTitle.String(), cl->fName->String()));
// TODO: Watch out for the coordinate system in AS_LAYER_INVAL_RECT // TODO: handle transformation (origin and scale) prior to converting to top
BRect invalRect; BRect invalRect;
link.Read<BRect>(&invalRect); link.Read<BRect>(&invalRect);
BRect converted(cl->ConvertToTop(invalRect.LeftTop()),
cl->ConvertToTop(invalRect.RightBottom()));
myRootLayer->GoRedraw(cl, BRegion(invalRect)); myRootLayer->GoRedraw(cl, BRegion(converted));
break; break;
} }
case AS_LAYER_INVAL_REGION: case AS_LAYER_INVAL_REGION: