No longer draws hidden views (the app_server still handles them wrong, though,
when they are hidden while being attached to the window). DrawAfterChildren() is now called at the appropriate place. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13224 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
223706b2c3
commit
8eee00f687
@ -2866,20 +2866,22 @@ BWindow::drawAllViews(BView* aView)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BWindow::DoUpdate(BView *aView, BRect &area)
|
BWindow::DoUpdate(BView *view, BRect &area)
|
||||||
{
|
{
|
||||||
|
|
||||||
STRACE(("info: BWindow::DoUpdate() BRect(%f,%f,%f,%f) called.\n",
|
STRACE(("info: BWindow::DoUpdate() BRect(%f,%f,%f,%f) called.\n",
|
||||||
area.left, area.top, area.right, area.bottom));
|
area.left, area.top, area.right, area.bottom));
|
||||||
|
|
||||||
aView->check_lock();
|
// don't draw hidden views or their children
|
||||||
|
if (view->IsHidden(view))
|
||||||
|
return;
|
||||||
|
|
||||||
// ToDo: DrawAfterChildren() is not called at all!
|
view->check_lock();
|
||||||
|
|
||||||
if (aView->Flags() & B_WILL_DRAW) {
|
if (view->Flags() & B_WILL_DRAW) {
|
||||||
aView->PushState();
|
// ToDo: make states robust
|
||||||
aView->Draw(area);
|
view->PushState();
|
||||||
aView->PopState();
|
view->Draw(area);
|
||||||
|
view->PopState();
|
||||||
} else {
|
} else {
|
||||||
// The code below is certainly not correct, because
|
// The code below is certainly not correct, because
|
||||||
// it redoes what the app_server already did
|
// it redoes what the app_server already did
|
||||||
@ -2891,7 +2893,7 @@ BWindow::DoUpdate(BView *aView, BRect &area)
|
|||||||
aView->SetHighColor(c);*/
|
aView->SetHighColor(c);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
BView *child = aView->first_child;
|
BView *child = view->first_child;
|
||||||
while (child) {
|
while (child) {
|
||||||
if (area.Intersects(child->Frame())) {
|
if (area.Intersects(child->Frame())) {
|
||||||
BRect newArea = area & child->Frame();
|
BRect newArea = area & child->Frame();
|
||||||
@ -2901,6 +2903,12 @@ BWindow::DoUpdate(BView *aView, BRect &area)
|
|||||||
}
|
}
|
||||||
child = child->next_sibling;
|
child = child->next_sibling;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (view->Flags() & B_WILL_DRAW) {
|
||||||
|
view->PushState();
|
||||||
|
view->DrawAfterChildren(area);
|
||||||
|
view->PopState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user