summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXPort.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-01-02 20:17:39 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-01-02 20:17:39 (GMT)
commit93c5fdf107657e8f0041985743fe2918ef0cd394 (patch)
tree6e43892a92a18b098a3179d12a5f981450042deb /macosx/tkMacOSXPort.h
parentaabb1827b3ff53a4b058b0406a581abadcac5bfd (diff)
downloadtk-93c5fdf107657e8f0041985743fe2918ef0cd394.zip
tk-93c5fdf107657e8f0041985743fe2918ef0cd394.tar.gz
tk-93c5fdf107657e8f0041985743fe2918ef0cd394.tar.bz2
The [winfo id] of a Tk window is meant to identify it. The actual value
returned, though, has been a hex-formatted int value -- that is 32 bits. On OS X Cocoa, the actual Window or XID is not an int but an unsigned long, and does not fit in 32 bits. (What's really stored even seems to be a (MacDrawable *) -- a pointer -- definitely not something 32-bits can capture). Thus generating [winfo id] loses info, and breaks totally. Has for a long time apparently. There are even explicit comments in place plainly stating that it is broken and what needs doing to fix it. Updated the platform-specific routines Tkp(Scan|Print)WindowId() so that window id's are no longer lossy and broken in Cocoa Tk.
Diffstat (limited to 'macosx/tkMacOSXPort.h')
-rw-r--r--macosx/tkMacOSXPort.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h
index 0a60cf6..6b56c83 100644
--- a/macosx/tkMacOSXPort.h
+++ b/macosx/tkMacOSXPort.h
@@ -162,14 +162,7 @@
*/
#define TkpPrintWindowId(buf,w) \
- sprintf((buf), "0x%x", (unsigned int) (w))
-
-/*
- * TkpScanWindowId is just an alias for Tcl_GetInt on Unix.
- */
-
-#define TkpScanWindowId(i,s,wp) \
- Tcl_GetInt((i),(s),(int *) (wp))
+ sprintf((buf), "0x%lx", (unsigned long) (w))
/*
* Turn off Tk double-buffering as Aqua windows are already double-buffered.