diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-01-07 14:44:22 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-01-07 14:44:22 (GMT) |
commit | 865e8ac50d1ada46d930b94c24f36e8108444405 (patch) | |
tree | 5d408616e0412c09c06f3b59803b33512ff45d95 /unix/tkUnixKey.c | |
parent | cbfd21a1c2d61e7de46d83c6b3d22a30e8c5fc00 (diff) | |
download | tk-865e8ac50d1ada46d930b94c24f36e8108444405.zip tk-865e8ac50d1ada46d930b94c24f36e8108444405.tar.gz tk-865e8ac50d1ada46d930b94c24f36e8108444405.tar.bz2 |
The proposed fix from Bug 3599312, which should make key map handling interact
better with input methods. Note that this does not work on OSX (in X11 mode)
because that handles the Alt key in its own special way.
Diffstat (limited to 'unix/tkUnixKey.c')
-rw-r--r-- | unix/tkUnixKey.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index b7fc97f..eaa33ae 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -280,6 +280,14 @@ TkpGetKeySym( int index; TkKeyEvent* kePtr = (TkKeyEvent*) eventPtr; + /* + * Refresh the mapping information if it's stale + */ + + if (dispPtr->bindInfoStale) { + TkpInitKeymapInfo(dispPtr); + } + #ifdef TK_USE_INPUT_METHODS /* * If input methods are active, we may already have determined a keysym. @@ -292,6 +300,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); @@ -303,14 +312,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. |