The Thai XIM component in libx11 activated on 'th*' locales normally filters input sequence according to orthographic rules. However, when NumLock/CapsLock is on, this stops working. All sequences are passed through.
This is caused by missing masks in _XimThaiFilter() (modules/im/ximcp/imThaiFlt.c), as in the attached patch.
Created attachment 11672 [details] [review]
Patch fixing the masks
This prevents events with LockMask and Mod2Mask on from being prematurely passed through.
Changed component from Lib/Xlib to I18N.
Created attachment 17680 [details] [review]
Updated patch without NumLockMask hardcoding
Update the patch, after a discussion in mailing list. The mask for NumLock is now queried from the server, rather than hard-coded, as different systems bind NumLock differently.
Changed component back to Lib/Xlib. This should be more correct. Let the i18n tag indicate its topic.
Note that this patch has been applied in Ubuntu Intrepid , and Thai Ubuntu
users are happy with that.
In fact, this bug is found in Debian, too. I just didn't file a Debian bug
because I've already filed it here upstream. It seems to be a common practice
for Debian to just forward bugs upstream (e.g. ). So, filing bug there
appears to be redundant, once it's reported upstream.
How about fixing this?
I found this bug in openSUSE 11.1 which is using libX11-1.1.5, too.
And everything work fine after i applied these patches:
- Patch of bug #12759 for fix Thai XIM fails to retrieve multi-byte surrounding text on UTF-8 locale
- Patch of bug #12517 (this bug) for fix Thai XIM does not filter inputs when NumLock/CapsLock is on
- Patch of bug #16457 for fix CharSet-to-CompoundText Conversion Failed for Thai Locales
Author: Theppitak Karoonboonyanan <email@example.com>
Date: Thu Apr 9 11:47:55 2009 +0700
Thai XIM not filters when NumLock or CapsLock is on
The Thai XIM component in libx11 activated on 'th*' locales normally filters
input sequence according to orthographic rules. However, when NumLock/CapsLo
is on, this stops working. All sequences are passed through.
This is caused by missing masks in _XimThaiFilter(), which normally screens
certain special keys from entering orthographic rules. Unfortunately, this
included events with NumLock/CapsLock on. Negating the masks from the check
allows the events to be tested by the rules.
X.Org Bug 12517 <http://bugs.freedesktop.org/show_bug.cgi?id=12517>
Signed-off-by: Theppitak Karoonboonyanan <firstname.lastname@example.org>
Signed-off-by: Julien Cristau <email@example.com>