summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorAlexander Weiss <ik@alexanderweiss.nl>2018-05-27 15:26:22 +0200
committerMichael Lutz <michi@icosahedron.de>2018-05-27 16:01:08 +0200
commit3e910a59699b0e337b9e7fbf29ceb1cdfc921ff5 (patch)
tree79a3796be9009b4fcab9d83750820a524fedb98f /src/video
parenta6300fe70b2969c6d0de07bad45948641f0ee7bc (diff)
downloadopenttd-3e910a59699b0e337b9e7fbf29ceb1cdfc921ff5.tar.xz
Change: [OSX] Disable macOS Sierra's automatic tab feature
Diffstat (limited to 'src/video')
-rw-r--r--src/video/cocoa/cocoa_v.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm
index f8412e387..d16561024 100644
--- a/src/video/cocoa/cocoa_v.mm
+++ b/src/video/cocoa/cocoa_v.mm
@@ -214,6 +214,12 @@ static void setupApplication()
}
#endif
+ /* Disable the system-wide tab feature as we only have one window. */
+ if ([ NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:) ]) {
+ /* We use nil instead of NO as withObject requires an id. */
+ [ NSWindow performSelector:@selector(setAllowsAutomaticWindowTabbing:) withObject:nil];
+ }
+
/* Become the front process, important when start from the command line. */
[ [ NSApplication sharedApplication ] activateIgnoringOtherApps:YES ];