From 4828a7251f33a441d194cfbb7b22a09c0f80f5d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 27 Apr 2005 23:20:29 +0000 Subject: [PATCH] I'm not 100% sure, but I think I fixed a confusion in sending the current view position and size to the client. Note that BView::originX and BView::originY are poorly named, because they are not the local coordinate system origin, but the offset within the parent at which the view is located. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12484 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/ServerWindow.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/servers/app/ServerWindow.cpp b/src/servers/app/ServerWindow.cpp index be779b84da..d27779b45a 100644 --- a/src/servers/app/ServerWindow.cpp +++ b/src/servers/app/ServerWindow.cpp @@ -550,7 +550,6 @@ void ServerWindow::DispatchMessage(int32 code, LinkMsgReader &link) _CopyBits(myRootLayer, cl, src, dst, xOffset, yOffset); - // TODO: notify the client, no? cl->fLayerData->OffsetOrigin(BPoint(dh, dv)); //cl->fBoundsLeftTop += BPoint(dh, dv); //cl->fFrame.OffsetBy(BPoint(-dh, -dv)); @@ -729,17 +728,12 @@ void ServerWindow::DispatchMessage(int32 code, LinkMsgReader &link) case AS_LAYER_GET_COORD: { STRACE(("ServerWindow %s: Message AS_LAYER_GET_COORD: Layer: %s\n",fName, cl->fName->String())); -printf("AS_LAYER_GET_COORD - Layer: %s\n", cl->GetName()); -cl->fFrame.PrintToStream(); -cl->BoundsOrigin().PrintToStream(); fMsgSender->StartMessage(SERVER_TRUE); - BPoint pt(cl->ConvertFromParent(cl->fFrame.LeftTop())); - fMsgSender->Attach(pt.x); - fMsgSender->Attach(pt.y); -// fMsgSender->Attach(cl->fFrame.left); -// fMsgSender->Attach(cl->fFrame.top); + // our offset in the parent -> will be originX and originY in BView + fMsgSender->Attach(cl->fFrame.left); + fMsgSender->Attach(cl->fFrame.top); + // convert frame to bounds fMsgSender->Attach(cl->fFrame.OffsetToCopy(cl->BoundsOrigin())); -// fMsgSender->Attach(cl->ConvertFromTop(cl->fFrame.OffsetToCopy(cl->fBoundsLeftTop))); fMsgSender->Flush(); break;