diff options
author | Owen Rudge <owen@owenrudge.net> | 2021-03-01 20:25:08 +0000 |
---|---|---|
committer | Owen Rudge <owen@owenrudge.net> | 2021-03-01 21:03:18 +0000 |
commit | 838fd61f299d4455e9a1fc5be883f4e9f9a40934 (patch) | |
tree | 8b9fc01bff2039100b1e65cf4f816dcd3b2f7745 /src/video/cocoa/cocoa_v.mm | |
parent | 02e7bc7e0a23ef30c796c681badfa1eaa6c950db (diff) | |
download | openttd-838fd61f299d4455e9a1fc5be883f4e9f9a40934.tar.xz |
Fix: [OSX] Hide dock when entering fullscreen
Diffstat (limited to 'src/video/cocoa/cocoa_v.mm')
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 523a408b1..af63fe5f4 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -196,6 +196,10 @@ bool VideoDriver_Cocoa::ToggleFullscreen(bool full_screen) if ([ this->window respondsToSelector:@selector(toggleFullScreen:) ]) { [ this->window performSelector:@selector(toggleFullScreen:) withObject:this->window ]; + + /* Hide the menu bar and the dock */ + [ NSMenu setMenuBarVisible:!full_screen ]; + this->UpdateVideoModes(); return true; } |