summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorculler <culler>2020-04-10 19:04:33 (GMT)
committerculler <culler>2020-04-10 19:04:33 (GMT)
commit836fc38d18c0acc08d85726892fb5748219787c7 (patch)
tree0420a3db27e552955a28d0ceb26b7c42bb1821fd
parented994e93becf8c9f824af6871b2bab30f0883018 (diff)
downloadtk-836fc38d18c0acc08d85726892fb5748219787c7.zip
tk-836fc38d18c0acc08d85726892fb5748219787c7.tar.gz
tk-836fc38d18c0acc08d85726892fb5748219787c7.tar.bz2
Deal with Snow Leopard.
-rw-r--r--macosx/tkMacOSXColor.c7
-rw-r--r--macosx/tkMacOSXMouseEvent.c8
2 files changed, 9 insertions, 6 deletions
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index 9b72732..6f55130 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -369,11 +369,12 @@ SetCGColorComponents(
colorUsingColorSpace:sRGB];
break;
case 8:
- if ([NSApp macMinorVersion] >= 14) {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
- color = [[NSColor controlAccentColor]
- colorUsingColorSpace:sRGB];
+ if (@available(macOS 14, *)) {
+#else
+ if (false) {
#endif
+ color = [[NSColor controlAccentColor] colorUsingColorSpace:sRGB];
} else {
color = [[NSColor
colorForControlTint:[NSColor currentControlTint]]
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index a93aca4..f4156fe 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -96,12 +96,14 @@ enum {
local = [theEvent locationInWindow];
/*
- * Do not send Press or Release XEvents for MouseDown events that start
- * a resize. The MouseUp is discarded by LiveResize.
+ * Do not send ButtonPress XEvents for MouseDown NSEvents that start a
+ * resize. (The MouseUp will be handled during LiveResize.) See
+ * ticket [d72abe6b54].
*/
if (eventType == NSEventTypeLeftMouseDown &&
- ([eventWindow styleMask] & NSWindowStyleMaskResizable)) {
+ ([eventWindow styleMask] & NSWindowStyleMaskResizable) &&
+ [NSApp macMinorVersion] > 6) {
NSRect frame = [eventWindow frame];
if (local.x < 3 || local.x > frame.size.width - 3 || local.y < 3) {
return theEvent;