summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2013-01-07 14:44:22 (GMT)
committerdkf <dkf@noemail.net>2013-01-07 14:44:22 (GMT)
commite676cf8ecfb97617e537da46fb02bc0b986eb838 (patch)
tree5d408616e0412c09c06f3b59803b33512ff45d95
parent4cf32f972e4286e5ab524050e565881683a71bd3 (diff)
downloadtk-e676cf8ecfb97617e537da46fb02bc0b986eb838.zip
tk-e676cf8ecfb97617e537da46fb02bc0b986eb838.tar.gz
tk-e676cf8ecfb97617e537da46fb02bc0b986eb838.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. FossilOrigin-Name: 4bb01e25effddf91aa19ff0e5cb917807c0ce0a0
-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.