gesturesingle: Pass through scroll events
We want to have them in GtkGestureDrag/Pan/Swipe. Ignore motion events when no button is pressed - otherwise moving the widget under the poitner in response to scrolling or a touchpad swipe would interfere with them. FIXME: I don't remmeber what ther button == 0 is about.
This commit is contained in:
@@ -196,6 +196,9 @@ gtk_gesture_single_handle_event (GtkEventController *controller,
|
||||
}
|
||||
}
|
||||
|
||||
if (button == 0)
|
||||
return FALSE;
|
||||
|
||||
break;
|
||||
case GDK_TOUCHPAD_HOLD:
|
||||
if (gdk_touchpad_event_get_n_fingers (event) == 1)
|
||||
@@ -204,6 +207,7 @@ gtk_gesture_single_handle_event (GtkEventController *controller,
|
||||
case GDK_TOUCH_CANCEL:
|
||||
case GDK_GRAB_BROKEN:
|
||||
case GDK_TOUCHPAD_SWIPE:
|
||||
case GDK_SCROLL:
|
||||
return GTK_EVENT_CONTROLLER_CLASS (gtk_gesture_single_parent_class)->handle_event (controller, event, x, y);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user