[PATCH 10/10] winemac: Opt out of macOS 10.12's automatic window tabbing feature.

Ken Thomases ken at codeweavers.com
Mon Apr 24 13:07:16 CDT 2017


It doesn't seem to work well.  In full-screen mode, newly-added windows don't
always properly resize to fill the screen, so they're not the same size as the
windows they're nominally tabbed with.  In non-full-screen mode, switching
between tabs sometimes causes the windows to grow in height each time.  Etc.

Signed-off-by: Ken Thomases <ken at codeweavers.com>
---
 dlls/winemac.drv/cocoa_app.m | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index 0caca9e..4013e03 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -32,6 +32,15 @@
 int macdrv_err_on;
 
 
+#if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
+ at interface NSWindow (WineAutoTabbingExtensions)
+
+    + (void) setAllowsAutomaticWindowTabbing:(BOOL)allows;
+
+ at end
+#endif
+
+
 /***********************************************************************
  *              WineLocalizedString
  *
@@ -124,6 +133,9 @@ + (void) initialize
                                       [NSNumber numberWithBool:NO], @"ApplePressAndHoldEnabled",
                                       nil];
             [[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
+
+            if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)])
+                [NSWindow setAllowsAutomaticWindowTabbing:NO];
         }
     }
 
-- 
2.10.2




More information about the wine-patches mailing list