Fixed resizing/moving using the new clipping code. Stephan (I know I wrote about these changes in Layer.cpp) I saw the changes you did at how B_VIEW_RESIZE/MOVED are handled. This might break compatibility with R5. I think you guys should discuss this.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13396 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca 2005-07-02 10:09:35 +00:00
parent 6fc5bc53fa
commit 173c6e9597
1 changed files with 13 additions and 28 deletions

View File

@ -864,56 +864,41 @@ BWindow::DispatchMessage(BMessage *msg, BHandler *target)
}
break;
}
/* case B_VIEW_MOVED:
/*
case B_VIEW_MOVED:
{
// NOTE: This message only arrives if the
// view has flags B_FRAME_EVENTS
BPoint where;
int32 token = B_NULL_TOKEN;
BView *view;
msg->FindPoint("where", &where);
msg->FindInt32("_token", &token);
msg->RemoveName("_token");
view = findView(top_view, token);
if (view)
// TODO: should we use dynamic_cast? isn't that a bit expensive?
if (target && target != this)
{
STRACE(("Calling BView(%s)::FrameMoved( %f, %f )\n", view->Name(), where.x, where.y));
view->FrameMoved( where );
STRACE(("Calling BView(%s)::FrameMoved( %f, %f )\n", target->Name(), where.x, where.y));
((BView*)target)->FrameMoved( where );
}
else
printf("***PANIC: BW: Can't find view with ID: %ld !***\n", token);
break;
}
case B_VIEW_RESIZED:
{
// NOTE: This message only arrives if the
// view has flags B_FRAME_EVENTS
float newWidth,
newHeight;
BPoint where;
int32 token = B_NULL_TOKEN;
BView *view;
msg->FindFloat("width", &newWidth);
msg->FindFloat("height", &newHeight);
msg->FindPoint("where", &where);
msg->FindInt32("_token", &token);
msg->RemoveName("_token");
view = findView(top_view, token);
if (view){
STRACE(("Calling BView(%s)::FrameResized( %f, %f )\n", view->Name(), newWidth, newHeight));
view->FrameResized( newWidth, newHeight );
// TODO: should we use dynamic_cast? isn't that a bit expensive?
if (target && target != this){
STRACE(("Calling BView(%s)::FrameResized( %f, %f )\n", target->Name(), newWidth, newHeight));
((BView*)target)->FrameResized( newWidth, newHeight );
}
else
printf("***PANIC: BW: Can't find view with ID: %ld !***\n", token);
break;
}
*/
case _MENUS_DONE_:
MenusEnded();
break;