summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixKey.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2013-02-28 09:07:06 (GMT)
committerdkf <dkf@noemail.net>2013-02-28 09:07:06 (GMT)
commit4705961a0a873fd780be5207ebe1186037d99825 (patch)
tree82fe68491188bdc4eec6a10b3bde9574423a0a66 /unix/tkUnixKey.c
parent193239ac3f0544bd1531c7bd33df025b727efc80 (diff)
parente676cf8ecfb97617e537da46fb02bc0b986eb838 (diff)
downloadtk-4705961a0a873fd780be5207ebe1186037d99825.zip
tk-4705961a0a873fd780be5207ebe1186037d99825.tar.gz
tk-4705961a0a873fd780be5207ebe1186037d99825.tar.bz2
[Bug 3599312]: Apply fix for Alt key problems.
FossilOrigin-Name: 92b9ecc3f8ac2ffa2954926f056c38ec55cd1920
Diffstat (limited to 'unix/tkUnixKey.c')
-rw-r--r--unix/tkUnixKey.c18
1 files changed, 10 insertions, 8 deletions
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.