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:
@@ -1896,8 +1896,7 @@ BWindow::Show()
|
|||||||
void
|
void
|
||||||
BWindow::Hide()
|
BWindow::Hide()
|
||||||
{
|
{
|
||||||
if (fShowLevel == 0) {
|
if (fShowLevel == 0 && Lock()) {
|
||||||
Lock();
|
|
||||||
fLink->StartMessage(AS_HIDE_WINDOW);
|
fLink->StartMessage(AS_HIDE_WINDOW);
|
||||||
fLink->Flush();
|
fLink->Flush();
|
||||||
Unlock();
|
Unlock();
|
||||||
@@ -2877,13 +2876,19 @@ BWindow::DoUpdate(BView *aView, BRect &area)
|
|||||||
|
|
||||||
// ToDo: DrawAfterChildren() is not called at all!
|
// ToDo: DrawAfterChildren() is not called at all!
|
||||||
|
|
||||||
if (aView->Flags() & B_WILL_DRAW)
|
if (aView->Flags() & B_WILL_DRAW) {
|
||||||
|
aView->PushState();
|
||||||
aView->Draw(area);
|
aView->Draw(area);
|
||||||
else {
|
aView->PopState();
|
||||||
rgb_color c = aView->HighColor();
|
} 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->SetHighColor(aView->ViewColor());
|
||||||
aView->FillRect(aView->Bounds(), B_SOLID_HIGH);
|
aView->FillRect(aView->Bounds(), B_SOLID_HIGH);
|
||||||
aView->SetHighColor(c);
|
aView->SetHighColor(c);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
BView *child = aView->first_child;
|
BView *child = aView->first_child;
|
||||||
|
|||||||
Reference in New Issue
Block a user