Commit 0888e6f4 authored by Bastien Nocera's avatar Bastien Nocera

gtk: Fix XIGrabKeycode usage

A modifier of "0" is still a modifier and must be submitted normally.
A num_modifiers of 0 is essentially a noop in the server.

As mentioned by Peter Hutterer <peter.hutterer@who-t.net>

https://bugzilla.gnome.org/show_bug.cgi?id=662839
parent 701c00e8
......@@ -513,13 +513,8 @@ grab_dnd_keys (GtkWidget *widget,
evmask.mask_len = sizeof (mask);
evmask.mask = mask;
if (grab_keys[i].modifiers != 0)
{
num_mods = 1;
mods.modifiers = grab_keys[i].modifiers;
}
else
num_mods = 0;
num_mods = 1;
mods.modifiers = grab_keys[i].modifiers;
XIGrabKeycode (GDK_WINDOW_XDISPLAY (window),
deviceid,
......@@ -591,13 +586,8 @@ ungrab_dnd_keys (GtkWidget *widget,
#ifdef XINPUT_2
if (using_xi2)
{
if (grab_keys[i].modifiers != 0)
{
num_mods = 1;
mods.modifiers = grab_keys[i].modifiers;
}
else
num_mods = 0;
num_mods = 1;
mods.modifiers = grab_keys[i].modifiers;
XIUngrabKeycode (GDK_WINDOW_XDISPLAY (window),
deviceid,
......
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