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