summaryrefslogtreecommitdiffstats
path: root/xlib
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-15 12:46:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-15 12:46:50 (GMT)
commitdc8dcbced6e03edb40b76e2108e6a4ecf6ff37fd (patch)
tree7b4861408b9e18ee855e5b601105592cec77be17 /xlib
parentfe4022603129271b3e6e9f98136265c7982938dc (diff)
downloadtk-dc8dcbced6e03edb40b76e2108e6a4ecf6ff37fd.zip
tk-dc8dcbced6e03edb40b76e2108e6a4ecf6ff37fd.tar.gz
tk-dc8dcbced6e03edb40b76e2108e6a4ecf6ff37fd.tar.bz2
Fix [a953736b546ce681cbfc]: Potential wrong use of TkKeyEvent. Finally done what's suggested there: Since kePtr->charValuePtr is only used on X11, only do the ckfree(kePtr->charValuePtr) on X11.
On Win32, use TkKeyEvent in stead of the non-standard XEvent. On macOS TkKeyEvent is not used, so no change is needed (- MC).
Diffstat (limited to 'xlib')
-rw-r--r--xlib/X11/Xlib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlib/X11/Xlib.h b/xlib/X11/Xlib.h
index af8f706..f3ee13d 100644
--- a/xlib/X11/Xlib.h
+++ b/xlib/X11/Xlib.h
@@ -549,9 +549,11 @@ typedef struct {
unsigned int state; /* key or button mask */
unsigned int keycode; /* detail */
Bool same_screen; /* same screen flag */
+#ifdef MAC_OSX_TK /* Only used on MacOSX. To be removed. */
char trans_chars[XMaxTransChars];
/* translated characters */
unsigned char nbytes;
+#endif
} XKeyEvent;
typedef XKeyEvent XKeyPressedEvent;
typedef XKeyEvent XKeyReleasedEvent;