summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McKernan <john.mckernan@sun.com>2009-05-01 13:53:03 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-05-01 13:53:03 -0700
commit535f8c5324205b92c15e8755008c33a2766832c8 (patch)
treecd39522d70eb8ea8129665656e05a141664e8245
parent061d3eebf7a0502afcd9c1831d67c8961feece8d (diff)
Sun bug 4010369: Too slow to process Keycode 0 events in Xt Translation Mgr.
Evaluation from original bug report against Solaris 2.6 in 1996: According to my investigation with the problem using debuggable libXt and libXm, keycode 0 keypress events, which are given to Xt's Translation Manager when inputting any cyrillic/greek characters, are not cached in Xt's Translation Manager. At the TRANSLATE macro in the Xt's source lib/Xt/TMkey.c, keycode 0 keyevents are always given to XtTranslateKeycode() and it consumes a long time to parse Motif's Translation Manager tables as many times as keycode 0 keyevent are given. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r--src/TMkey.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/TMkey.c b/src/TMkey.c
index 4194445..71bfddb 100644
--- a/src/TMkey.c
+++ b/src/TMkey.c
@@ -129,7 +129,10 @@ FM(0x1e), FM(0x9e), FM(0x5e), FM(0xde), FM(0x3e), FM(0xbe), FM(0x7e), FM(0xfe)
{ \
int _i_ = (((key) - (pd)->min_keycode + modmix[(mod) & 0xff]) & \
(TMKEYCACHESIZE-1)); \
- if ((key) != 0 && /* Xlib XIM composed input */ \
+ if ((key) == 0) { /* Xlib XIM composed input */ \
+ mod_ret = 0; \
+ sym_ret = 0; \
+ } else if ( /* not Xlib XIM composed input */ \
(ctx)->keycache.keycode[_i_] == (key) && \
(ctx)->keycache.modifiers[_i_] == (mod)) { \
mod_ret = MOD_RETURN(ctx, key); \