fix: menu bar visibility when exiting full screen (#38599)
This commit is contained in:
parent
5ee890fb6f
commit
c8bdd014c8
3 changed files with 52 additions and 3 deletions
|
@ -731,10 +731,14 @@ void NativeWindowViews::SetFullScreen(bool fullscreen) {
|
|||
gfx::Rect());
|
||||
|
||||
// Auto-hide menubar when in fullscreen.
|
||||
if (fullscreen)
|
||||
if (fullscreen) {
|
||||
menu_bar_visible_before_fullscreen_ = IsMenuBarVisible();
|
||||
SetMenuBarVisibility(false);
|
||||
else
|
||||
SetMenuBarVisibility(!IsMenuBarAutoHide());
|
||||
} else {
|
||||
SetMenuBarVisibility(!IsMenuBarAutoHide() &&
|
||||
menu_bar_visible_before_fullscreen_);
|
||||
menu_bar_visible_before_fullscreen_ = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -321,6 +321,9 @@ class NativeWindowViews : public NativeWindow,
|
|||
// Handles unhandled keyboard messages coming back from the renderer process.
|
||||
views::UnhandledKeyboardEventHandler keyboard_event_handler_;
|
||||
|
||||
// Whether the menubar is visible before the window enters fullscreen
|
||||
bool menu_bar_visible_before_fullscreen_ = false;
|
||||
|
||||
// Whether the window should be enabled based on user calls to SetEnabled()
|
||||
bool is_enabled_ = true;
|
||||
// How many modal children this window has;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue