forked from AuroraMiddleware/gtk
gdkdragsource: Ensure button >= 1
So the left shift later doesn't overflow.
This commit is contained in:
parent
1aa37687be
commit
f4a24babd4
@ -58,6 +58,8 @@ gtk_drag_source_gesture_begin (GtkGesture *gesture,
|
|||||||
else
|
else
|
||||||
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
|
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
|
||||||
|
|
||||||
|
g_assert (button >= 1);
|
||||||
|
|
||||||
if (!site->start_button_mask ||
|
if (!site->start_button_mask ||
|
||||||
!(site->start_button_mask & (GDK_BUTTON1_MASK << (button - 1))))
|
!(site->start_button_mask & (GDK_BUTTON1_MASK << (button - 1))))
|
||||||
gtk_gesture_set_state (gesture, GTK_EVENT_SEQUENCE_DENIED);
|
gtk_gesture_set_state (gesture, GTK_EVENT_SEQUENCE_DENIED);
|
||||||
|
Loading…
Reference in New Issue
Block a user