summaryrefslogtreecommitdiff
path: root/src/video/cocoa
diff options
context:
space:
mode:
authorOwen Rudge <owen@owenrudge.net>2021-03-01 20:25:08 +0000
committerOwen Rudge <owen@owenrudge.net>2021-03-01 21:03:18 +0000
commit838fd61f299d4455e9a1fc5be883f4e9f9a40934 (patch)
tree8b9fc01bff2039100b1e65cf4f816dcd3b2f7745 /src/video/cocoa
parent02e7bc7e0a23ef30c796c681badfa1eaa6c950db (diff)
downloadopenttd-838fd61f299d4455e9a1fc5be883f4e9f9a40934.tar.xz
Fix: [OSX] Hide dock when entering fullscreen
Diffstat (limited to 'src/video/cocoa')
-rw-r--r--src/video/cocoa/cocoa_v.mm4
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;
}