a new graphics state is pushed before calling BView::Draw() and popped after it. So any state changes you do in your Draw() function will be forgotton when you're done, as on R5. I have not done a lot of testing for bugs in the state stack within the app_server though...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13174 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9b0c5e413c
commit
4d67034226
@ -1896,8 +1896,7 @@ BWindow::Show()
|
||||
void
|
||||
BWindow::Hide()
|
||||
{
|
||||
if (fShowLevel == 0) {
|
||||
Lock();
|
||||
if (fShowLevel == 0 && Lock()) {
|
||||
fLink->StartMessage(AS_HIDE_WINDOW);
|
||||
fLink->Flush();
|
||||
Unlock();
|
||||
@ -2877,13 +2876,19 @@ BWindow::DoUpdate(BView *aView, BRect &area)
|
||||
|
||||
// ToDo: DrawAfterChildren() is not called at all!
|
||||
|
||||
if (aView->Flags() & B_WILL_DRAW)
|
||||
if (aView->Flags() & B_WILL_DRAW) {
|
||||
aView->PushState();
|
||||
aView->Draw(area);
|
||||
else {
|
||||
rgb_color c = aView->HighColor();
|
||||
aView->PopState();
|
||||
} else {
|
||||
// The code below is certainly not correct, because
|
||||
// it redoes what the app_server already did
|
||||
// Find out what happens if a view has ViewColor() =
|
||||
// B_TRANSPARENT_COLOR but not B_WILL_DRAW
|
||||
/* rgb_color c = aView->HighColor();
|
||||
aView->SetHighColor(aView->ViewColor());
|
||||
aView->FillRect(aView->Bounds(), B_SOLID_HIGH);
|
||||
aView->SetHighColor(c);
|
||||
aView->SetHighColor(c);*/
|
||||
}
|
||||
|
||||
BView *child = aView->first_child;
|
||||
|
Loading…
Reference in New Issue
Block a user