Summary: | XEmbed client doesn't receive key events from XIM | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Hidetoshi Tajima <yakiudon> | ||||||
Component: | Lib/Xlib | Assignee: | Hidetoshi Tajima <yakiudon> | ||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | high | CC: | alan.coopersmith, roland.mainz | ||||||
Version: | git | ||||||||
Hardware: | All | ||||||||
OS: | Linux (All) | ||||||||
Whiteboard: | |||||||||
i915 platform: | i915 features: | ||||||||
Attachments: |
|
Description
Hidetoshi Tajima
2004-12-03 11:54:33 UTC
Created attachment 1457 [details]
test case gtk-embedder ang gtk-client
A suspecious code is found in xc/lib/X11/imEvToWire.c. At line 408: if (((XAnyEvent *)re)->send_event) event->u.u.type &= 0x80; This converts the X events with send_event bit ON to the wired events with uu.type = 0. Since the events that Xembedder sends to embedded clients have the send_event bit ON, it hits this case. As the results, the wired events sent to the XIM server are converted back to x events with type 0(zero), and will not be processed properly. I think the above must be a typo and that it should be: event->u.u.type |= 0x80; Uhm... I doubt Xlib/Xft is the right component... isn't this XIM related ? Yes, Lib/Xlib is a right category. The patch should be applied to xc/lib/X11/imEvToWire.c. Created attachment 2031 [details] [review] correct mask of the xevents of send_event masks &= 0x80 operation is obviously wrong, since it resets event type field to 0, This is most likely a typo of |= 0x80. Roland and Alan: Please review the patch and commit for me to the cvs HEAD if it looks good. Patch makes sense to me, so I went ahead and committed it to head: CVSROOT: /cvs/xorg Module name: xc Changes by: alanc@gabe.freedesktop.org 05/03/07 18:53:36 Log message: 2005-03-07 Alan Coopersmith <alan.coopersmith@sun.com> * xc/lib/X11/imEvToWire.c: Bugzilla Bug 2006 (https://bugs.freedesktop.org/show_bug.cgi?id=2006) Patch #2031 (https://bugs.freedesktop.org/attachment.cgi?id=2031) XEmbed client doesn't receive key events from XIM: Use | to set a bit, not &. Patch by Hidetoshi Tajima <hidetoshi.tajima@sun.com>. Modified files: ./: ChangeLog xc/lib/X11/: imEvToWire.c Revision Changes Path 1.803 +9 -1 xc/ChangeLog 1.3 +1 -1 xc/lib/X11/imEvToWire.c |
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.