Send only one AS_BEGIN/END_UPDATE message, not for every view

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12195 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2005-03-31 16:36:34 +00:00
parent a39f4c6365
commit 52bd978684
+4 -8
View File
@@ -928,9 +928,10 @@ void BWindow::DispatchMessage(BMessage *msg, BHandler *target)
msg->FindRect("_rect", &updateRect); msg->FindRect("_rect", &updateRect);
msg->FindInt32("_token",&token); msg->FindInt32("_token",&token);
view=findView(top_view,token); fLink->StartMessage(AS_BEGIN_UPDATE);
if(view) DoUpdate(top_view, updateRect);
DoUpdate(top_view, updateRect); fLink->StartMessage(AS_END_UPDATE);
fLink->Flush();
break; break;
} }
case B_VIEW_MOVED: case B_VIEW_MOVED:
@@ -3162,7 +3163,6 @@ void BWindow::DoUpdate(BView* aView, BRect& area)
area.left, area.top, area.right, area.bottom)); area.left, area.top, area.right, area.bottom));
aView->check_lock(); aView->check_lock();
fLink->StartMessage(AS_BEGIN_UPDATE);
if (aView->Flags() & B_WILL_DRAW) if (aView->Flags() & B_WILL_DRAW)
aView->Draw( area ); aView->Draw( area );
@@ -3174,9 +3174,6 @@ void BWindow::DoUpdate(BView* aView, BRect& area)
aView->SetHighColor(c); aView->SetHighColor(c);
} }
aView->check_lock();
fLink->StartMessage(AS_END_UPDATE);
BView *child; BView *child;
if ( (child = aView->first_child) ) if ( (child = aView->first_child) )
{ {
@@ -3192,7 +3189,6 @@ void BWindow::DoUpdate(BView* aView, BRect& area)
child = child->next_sibling; child = child->next_sibling;
} }
} }
fLink->Flush();
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------