Bug 12517 - Thai XIM does not filter inputs when NumLock/CapsLock is on
Summary: Thai XIM does not filter inputs when NumLock/CapsLock is on
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: 7.3 (2007.09)
Hardware: All All
: medium minor
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: i18n, patch
Depends on:
Blocks:
 
Reported: 2007-09-22 02:29 UTC by Theppitak Karoonboonyanan
Modified: 2009-04-13 09:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch fixing the masks (674 bytes, patch)
2007-09-22 02:34 UTC, Theppitak Karoonboonyanan
no flags Details | Splinter Review
Updated patch without NumLockMask hardcoding (1.13 KB, patch)
2008-07-15 01:18 UTC, Theppitak Karoonboonyanan
no flags Details | Splinter Review

Description Theppitak Karoonboonyanan 2007-09-22 02:29:39 UTC
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.
Comment 1 Theppitak Karoonboonyanan 2007-09-22 02:34:05 UTC
Created attachment 11672 [details] [review]
Patch fixing the masks

This prevents events with LockMask and Mod2Mask on from being prematurely passed through.
Comment 2 Theppitak Karoonboonyanan 2007-10-09 19:03:03 UTC
Changed component from Lib/Xlib to I18N.
Comment 3 Theppitak Karoonboonyanan 2008-07-15 01:18:12 UTC
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.
Comment 4 Theppitak Karoonboonyanan 2008-07-15 01:22:44 UTC
Changed component back to Lib/Xlib. This should be more correct. Let the i18n tag indicate its topic.
Comment 5 Theppitak Karoonboonyanan 2009-02-09 18:23:49 UTC
*ping*

Note that this patch has been applied in Ubuntu Intrepid [1], and Thai Ubuntu
users are happy with that.

  [1] https://bugs.launchpad.net/ubuntu/+bug/273856/comments/26

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. [2]). So, filing bug there
appears to be redundant, once it's reported upstream.

  [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=443800

How about fixing this?
Comment 6 Thanomsub Noppaburana 2009-02-11 23:11:43 UTC
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
Comment 7 Julien Cristau 2009-04-13 09:31:30 UTC
commit e09f0d227fbf95b6252759af9d426efd57686f9f
Author: Theppitak Karoonboonyanan <thep@linux.thai.net>
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 <thep@linux.thai.net>
    Signed-off-by: Julien Cristau <jcristau@debian.org>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.