summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorculler <culler>2018-12-11 16:18:28 (GMT)
committerculler <culler>2018-12-11 16:18:28 (GMT)
commit46f185860fa00ffdd16e76a376385374bff03596 (patch)
tree6862f3977ece564b029243253663e14e505f13c5
parent3deab41767b92c500aa9f57d9905827e2ad6629e (diff)
downloadtk-46f185860fa00ffdd16e76a376385374bff03596.zip
tk-46f185860fa00ffdd16e76a376385374bff03596.tar.gz
tk-46f185860fa00ffdd16e76a376385374bff03596.tar.bz2
On OSX 10.6 the styleMask must be cleared to get rid of the title bar. Fix a
compiler error on 10.9.
-rw-r--r--macosx/tkMacOSXWm.c19
-rw-r--r--tests/unixWm.test2
2 files changed, 16 insertions, 5 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index fc6cab7..5cf0820 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -6513,10 +6513,10 @@ ApplyWindowAttributeFlagChanges(
* This behavior, which makes the green button expand a window to
* full screen, was included in the default as of OSX 10.13. For
* uniformity we use the new default in all versions of the OS
- * where the behavior exists.
+ * after 10.10.
*/
-#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
+#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 101000)
if (!(macWindow.styleMask & NSUtilityWindowMask)) {
/*
@@ -6620,7 +6620,11 @@ ApplyMasterOverrideChanges(
wmPtr->attributes = macClassAttrs[kSimpleWindowClass].defaultAttrs;
}
wmPtr->attributes |= kWindowNoActivatesAttribute;
- styleMask &= ~NSTitledWindowMask;
+ if ([NSApp macMinorVersion] == 6) {
+ styleMask = 0;
+ } else {
+ styleMask &= ~NSTitledWindowMask;
+ }
} else {
if (wmPtr->macClass == kSimpleWindowClass &&
oldAttributes == kWindowNoActivatesAttribute) {
@@ -6629,7 +6633,14 @@ ApplyMasterOverrideChanges(
macClassAttrs[kDocumentWindowClass].defaultAttrs;
}
wmPtr->attributes &= ~kWindowNoActivatesAttribute;
- styleMask |= NSTitledWindowMask;
+ if ([NSApp macMinorVersion] == 6) {
+ styleMask = NSTitledWindowMask |
+ NSClosableWindowMask |
+ NSMiniaturizableWindowMask |
+ NSResizableWindowMask;
+ } else {
+ styleMask |= NSTitledWindowMask;
+ }
}
if (macWindow) {
NSWindow *parentWindow = [macWindow parentWindow];
diff --git a/tests/unixWm.test b/tests/unixWm.test
index da324bb..a0224a1 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -19,7 +19,7 @@ proc sleep ms {
vwait x
}
-# Recent versions of macOS show an animation when a window is deiconified.
+# The macOS window manager shows an animation when a window is deiconified.
# Tests which check the geometry of a window after deiconifying it should
# wait for the animation to finish.