mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 15:01:23 +00:00
xi2: Ignore button release events of button 4-7
We treat button presses of button 4-7 as scroll wheel events, so release events should be ignored. https://bugzilla.gnome.org/show_bug.cgi?id=643925
This commit is contained in:
parent
0a03e81224
commit
7aeb3c725b
@ -1104,6 +1104,12 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
event->scroll.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
|
||||
break;
|
||||
}
|
||||
/* Button presses of button 4-7 are scroll events, so ignore the release */
|
||||
else if (ev->evtype == XI_ButtonRelease)
|
||||
{
|
||||
return_val = FALSE;
|
||||
break;
|
||||
}
|
||||
/* else (XI_ButtonRelease) fall thru */
|
||||
default:
|
||||
event->button.type = (ev->evtype == XI_ButtonPress) ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE;
|
||||
@ -1141,6 +1147,9 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
event->button.button = xev->detail;
|
||||
}
|
||||
|
||||
if (return_val == FALSE)
|
||||
break;
|
||||
|
||||
if (!set_screen_from_root (display, event, xev->root))
|
||||
{
|
||||
return_val = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user