diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-02-28 09:10:39 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-02-28 09:10:39 (GMT) |
commit | bf80f6ef08005e8ed3da3a8ece7fefa373fc8dd8 (patch) | |
tree | c786446314f395efd2d48d54d8b78d9af080715e | |
parent | 2b76c49e30421aa22968c63e57c49bfaa6238e2f (diff) | |
parent | d633ff9ebc49787402b8ec2e2e47899b5d8107cc (diff) | |
download | tk-bf80f6ef08005e8ed3da3a8ece7fefa373fc8dd8.zip tk-bf80f6ef08005e8ed3da3a8ece7fefa373fc8dd8.tar.gz tk-bf80f6ef08005e8ed3da3a8ece7fefa373fc8dd8.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-02-18 Jan Nijtmans <nijtmans@users.sf.net> * unix/tkUnixEvent.c: Call XInitThreads once before the diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index a59d94e..5ea90f4 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -281,6 +281,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. @@ -293,6 +302,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); @@ -304,14 +314,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. |