diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-24 11:49:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-24 11:49:30 (GMT) |
commit | 14ffbbfd3279791bcc99fd50066d6821e92cc5f9 (patch) | |
tree | 633a1c584b40b8c557a2c7ee10b6db57966d271f /macosx/tkMacOSXWm.c | |
parent | aeb98f3a5488e637486a6b376b172de8a658d4b9 (diff) | |
download | tk-14ffbbfd3279791bcc99fd50066d6821e92cc5f9.zip tk-14ffbbfd3279791bcc99fd50066d6821e92cc5f9.tar.gz tk-14ffbbfd3279791bcc99fd50066d6821e92cc5f9.tar.bz2 |
Allow "wm frame" to return id's > 0xFFFFFFFF on 64-bit platforms (if the id really is that large). Backport the (internal) use of TCL_Z_MODIFIER from Tk 8.7.
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r-- | macosx/tkMacOSXWm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index ca19197..25966a6 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -1984,6 +1984,7 @@ WmFrameCmd( { register WmInfo *wmPtr = winPtr->wmInfoPtr; Window window; + char buf[TCL_INTEGER_SPACE]; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); @@ -1993,7 +1994,8 @@ WmFrameCmd( if (window == None) { window = Tk_WindowId((Tk_Window) winPtr); } - Tcl_SetObjResult(interp, Tcl_ObjPrintf("0x%x", (unsigned) window)); + sprintf(buf, "0x%" TCL_Z_MODIFIER "x", (size_t)window); + Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); return TCL_OK; } |