Module: wine Branch: master Commit: e49feb63f489141c08a967a9c47930559e1de4f7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e49feb63f489141c08a967a9c4...
Author: Ken Thomases ken@codeweavers.com Date: Mon Apr 24 13:07:16 2017 -0500
winemac: Opt out of macOS 10.12's automatic window tabbing feature.
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@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 @@ static NSString* const WineAppWaitQueryResponseMode = @"WineAppWaitQueryResponse int macdrv_err_on;
+#if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 +@interface NSWindow (WineAutoTabbingExtensions) + + + (void) setAllowsAutomaticWindowTabbing:(BOOL)allows; + +@end +#endif + + /*********************************************************************** * WineLocalizedString * @@ -124,6 +133,9 @@ static NSString* WineLocalizedString(unsigned int stringID) [NSNumber numberWithBool:NO], @"ApplePressAndHoldEnabled", nil]; [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; + + if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)]) + [NSWindow setAllowsAutomaticWindowTabbing:NO]; } }