summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c76
1 files changed, 59 insertions, 17 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 37a1d25..69d3cfb 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -200,6 +200,48 @@ static int tkMacOSXWmAttrNotifyVal = 0;
static Tcl_HashTable windowTable;
static int windowHashInit = false;
+
+
+#pragma mark NSWindow(TKWm)
+
+/*
+ * Conversion of coordinates between window and screen.
+ */
+
+@implementation NSWindow(TKWm)
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+- (NSPoint) convertPointToScreen: (NSPoint) point
+{
+ return [self convertBaseToScreen:point];
+}
+- (NSPoint) convertPointFromScreen: (NSPoint)point
+{
+ return [self convertScreenToBase:point];
+}
+@end
+#else
+- (NSPoint) convertPointToScreen: (NSPoint) point
+{
+ NSRect pointrect;
+ pointrect.origin = point;
+ pointrect.size.width = 0;
+ pointrect.size.height = 0;
+ return [self convertRectToScreen:pointrect].origin;
+}
+- (NSPoint) convertPointFromScreen: (NSPoint)point
+{
+ NSRect pointrect;
+ pointrect.origin = point;
+ pointrect.size.width = 0;
+ pointrect.size.height = 0;
+ return [self convertRectFromScreen:pointrect].origin;
+}
+@end
+#endif
+
+#pragma mark -
+
+
/*
* Forward declarations for procedures defined in this file:
*/
@@ -817,7 +859,7 @@ TkWmDeadWindow(
}
[pool drain];
}
- ckfree(wmPtr);
+ ckfree((char *)wmPtr);
winPtr->wmInfoPtr = NULL;
}
@@ -5194,22 +5236,22 @@ WmWinStyle(
{ "moveToActiveSpace", tkMoveToActiveSpaceAttribute },
{ "nonActivating", tkNonactivatingPanelAttribute },
{ "hud", tkHUDWindowAttribute },
- { "black", NULL },
- { "dark", NULL },
- { "light", NULL },
- { "gray", NULL },
- { "red", NULL },
- { "green", NULL },
- { "blue", NULL },
- { "cyan", NULL },
- { "yellow", NULL },
- { "magenta", NULL },
- { "orange", NULL },
- { "purple", NULL },
- { "brown", NULL },
- { "clear", NULL },
- { "opacity", NULL },
- { "fullscreen", NULL },
+ { "black", 0 },
+ { "dark", 0 },
+ { "light", 0 },
+ { "gray", 0 },
+ { "red", 0 },
+ { "green", 0 },
+ { "blue", 0 },
+ { "cyan", 0 },
+ { "yellow", 0 },
+ { "magenta", 0 },
+ { "orange", 0 },
+ { "purple", 0 },
+ { "brown", 0 },
+ { "clear", 0 },
+ { "opacity", 0 },
+ { "fullscreen", 0 },
{ NULL }
};