forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
701c00e8cf
commit
0888e6f485
18
gtk/gtkdnd.c
18
gtk/gtkdnd.c
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user