mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
gdkdragsource: Ensure button >= 1
So the left shift later doesn't overflow.
This commit is contained in:
parent
92fd8cb81b
commit
6f30e97c3d
@ -58,6 +58,8 @@ gtk_drag_source_gesture_begin (GtkGesture *gesture,
|
||||
else
|
||||
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
|
||||
|
||||
g_assert (button >= 1);
|
||||
|
||||
if (!site->start_button_mask ||
|
||||
!(site->start_button_mask & (GDK_BUTTON1_MASK << (button - 1))))
|
||||
gtk_gesture_set_state (gesture, GTK_EVENT_SEQUENCE_DENIED);
|
||||
|
Loading…
Reference in New Issue
Block a user