diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-15 12:46:50 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-15 12:46:50 (GMT) |
commit | dc8dcbced6e03edb40b76e2108e6a4ecf6ff37fd (patch) | |
tree | 7b4861408b9e18ee855e5b601105592cec77be17 /generic/tkInt.h | |
parent | fe4022603129271b3e6e9f98136265c7982938dc (diff) | |
download | tk-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 'generic/tkInt.h')
-rw-r--r-- | generic/tkInt.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tkInt.h b/generic/tkInt.h index 8f958ab..d90cb0e 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -852,6 +852,11 @@ typedef struct TkWindow { typedef struct { XKeyEvent keyEvent; /* The real event from X11. */ +#ifdef _WIN32 + char trans_chars[XMaxTransChars]; + /* translated characters */ + unsigned char nbytes; +#else char *charValuePtr; /* A pointer to a string that holds the key's * %A substitution text (before backslash * adding), or NULL if that has not been @@ -861,6 +866,7 @@ typedef struct { * is non-NULL. */ KeySym keysym; /* Key symbol computed after input methods * have been invoked */ +#endif } TkKeyEvent; /* |