Fix flickering menus, especially menu bars.

Figured out by Stephan originally and only hacked in WebPositive, I knew
something about WebPositive was different because it did not flicker when
everything else did.

Since we fully draw the menus there is no need to have app_server fill in the
background with the view color. That is what was causing the flickering.

Should fix #484, #532 and #4335. Thanks diver for confirming the patch against
those tickets.
This commit is contained in:
Ryan Leavengood 2012-08-02 23:16:18 -04:00
parent 886f1456af
commit 0eed2a7c98
2 changed files with 3 additions and 3 deletions

View File

@ -1439,7 +1439,7 @@ BMenu::_InitData(BMessage* archive)
fLayoutData->lastResizingMode = ResizingMode(); fLayoutData->lastResizingMode = ResizingMode();
SetLowColor(sMenuInfo.background_color); SetLowColor(sMenuInfo.background_color);
SetViewColor(sMenuInfo.background_color); SetViewColor(B_TRANSPARENT_COLOR);
fTriggerEnabled = sMenuInfo.triggers_always_shown; fTriggerEnabled = sMenuInfo.triggers_always_shown;

View File

@ -47,8 +47,8 @@ struct menubar_data {
BMenuBar::BMenuBar(BRect frame, const char* title, uint32 resizeMask, BMenuBar::BMenuBar(BRect frame, const char* title, uint32 resizeMask,
menu_layout layout, bool resizeToFit) menu_layout layout, bool resizeToFit)
: :
BMenu(frame, title, resizeMask, B_WILL_DRAW | B_FRAME_EVENTS, layout, BMenu(frame, title, resizeMask, B_WILL_DRAW | B_FRAME_EVENTS
resizeToFit), | B_FULL_UPDATE_ON_RESIZE, layout, resizeToFit),
fBorder(B_BORDER_FRAME), fBorder(B_BORDER_FRAME),
fTrackingPID(-1), fTrackingPID(-1),
fPrevFocusToken(-1), fPrevFocusToken(-1),