Commit 2661403f authored by Matthias Clasen's avatar Matthias Clasen

Fix DND keyboard control with XI2

We are using XI2 to grab the key events, but we did not do the
necessary extra work to make GDK deliver root window events to us.

https://bugzilla.gnome.org/show_bug.cgi?id=681006
parent 5a3442bf
......@@ -411,6 +411,18 @@ root_key_filter (GdkXEvent *xevent,
if ((ev->type == KeyPress || ev->type == KeyRelease) &&
ev->xkey.root == ev->xkey.window)
ev->xkey.window = (Window)data;
else if (ev->type == GenericEvent)
{
XGenericEventCookie *cookie;
XIDeviceEvent *dev;
cookie = &ev->xcookie;
dev = (XIDeviceEvent *) cookie->data;
if (dev->evtype == XI_KeyPress ||
dev->evtype == XI_KeyRelease)
dev->event = (Window)data;
}
return GDK_FILTER_CONTINUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment