updated on Thu Jan 5 13:17:10 UTC 2012
[aur-mirror.git] / gtk3-with-xim-patch / xim.patch
blob36135834408dbb83676bb920aac93c7da25f223c
1 diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
2 index 3a520c1..7d23e7e 100644
3 --- a/gdk/x11/gdkdevicemanager-xi2.c
4 +++ b/gdk/x11/gdkdevicemanager-xi2.c
5 @@ -936,13 +936,18 @@ gdk_x11_device_manager_xi2_translate_core_event (GdkEventTranslator *translator,
6 gboolean keyboard = FALSE;
7 GdkDevice *device;
9 - if (xevent->type == KeyPress && xevent->xkey.keycode == 0)
10 + if ((xevent->type == KeyPress || xevent->type == KeyRelease) &&
11 + (xevent->xkey.keycode == 0 || xevent->xkey.serial == 0))
13 /* The X input methods (when triggered via XFilterEvent)
14 * generate a core key press event with keycode 0 to signal the
15 * end of a key sequence. We use the core translate_event
16 * implementation to translate this event.
18 + * Other less educated IM modules like to filter every keypress,
19 + * only to have these replaced by their own homegrown events,
20 + * these events oddly have serial=0, so we try to catch these.
21 + *
22 * This is just a bandaid fix to keep xim working with a single
23 * keyboard until XFilterEvent learns about XI2.
25 --
26 1.7.4.2