diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-02-28 09:07:06 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-02-28 09:07:06 (GMT) |
commit | fff751ff58a3b13e772675869faf5149412f9e0b (patch) | |
tree | 82fe68491188bdc4eec6a10b3bde9574423a0a66 | |
parent | 6b3657de3ea8ca1acc1f6fbdad56814ec26c1dd8 (diff) | |
parent | 865e8ac50d1ada46d930b94c24f36e8108444405 (diff) | |
download | tk-fff751ff58a3b13e772675869faf5149412f9e0b.zip tk-fff751ff58a3b13e772675869faf5149412f9e0b.tar.gz tk-fff751ff58a3b13e772675869faf5149412f9e0b.tar.bz2 |
[Bug 3599312]: Apply fix for Alt key problems.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | unix/tkUnixKey.c | 18 |
2 files changed, 17 insertions, 8 deletions
@@ -1,3 +1,10 @@ +2013-02-28 Donal K. Fellows <dkf@users.sf.net> + + * unix/tkUnixKey.c (TkpGetKeySym): [Bug 3599312]: Put the + initialization of the key mapping before the input method handling + so that Alt key handling is correct on non-OSX Unix. Thanks to + Colin McDonald for developing the fix. + 2013-01-16 Jan Nijtmans <nijtmans@users.sf.net> * win/Makefile.in: Don't compile Tk with -DTCL_NO_DEPRECATED by default diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index ef5b22c..a730001 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -285,6 +285,15 @@ TkpGetKeySym( int index; TkKeyEvent* kePtr = (TkKeyEvent*) eventPtr; + /* + * Refresh the mapping information if it's stale. This must happen before + * we do any input method processing. [Bug 3599312] + */ + + if (dispPtr->bindInfoStale) { + TkpInitKeymapInfo(dispPtr); + } + #ifdef TK_USE_INPUT_METHODS /* * If input methods are active, we may already have determined a keysym. @@ -297,6 +306,7 @@ TkpGetKeySym( Tcl_DString ds; TkWindow *winPtr = (TkWindow *) Tk_IdToWindow(eventPtr->xany.display, eventPtr->xany.window); + Tcl_DStringInit(&ds); (void) TkpGetString(winPtr, eventPtr, &ds); Tcl_DStringFree(&ds); @@ -308,14 +318,6 @@ TkpGetKeySym( #endif /* - * Refresh the mapping information if it's stale - */ - - if (dispPtr->bindInfoStale) { - TkpInitKeymapInfo(dispPtr); - } - - /* * Figure out which of the four slots in the keymap vector to use for this * key. Refer to Xlib documentation for more info on how this computation * works. |