summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-01-07 14:44:22 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-01-07 14:44:22 (GMT)
commit606efd3fa0263aa5eeb8df60bc6639310b3c4238 (patch)
tree5d408616e0412c09c06f3b59803b33512ff45d95 /unix
parent5b219a0744344a3eec4c725c03c6aae3e0111c81 (diff)
downloadtk-606efd3fa0263aa5eeb8df60bc6639310b3c4238.zip
tk-606efd3fa0263aa5eeb8df60bc6639310b3c4238.tar.gz
tk-606efd3fa0263aa5eeb8df60bc6639310b3c4238.tar.bz2
The proposed fix from Bug 3599312, which should make key map handling interactbug_3599312
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')
-rw-r--r--unix/tkUnixKey.c17
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.