window: Only claim the sequence if keeping the grab

If the grab belongs elsewhere, the window won't claim the sequence right
away. The sequence may still be claimed afterwards when window dragging
starts, but simple clicks won't be consumed this way.

This makes it possible to close popovers when clicking on the title region,
while still permitting touch/button 1 interaction for every other purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=743257
This commit is contained in:
Carlos Garnacho 2015-01-25 17:55:01 +00:00
parent ea983404ec
commit 3f4df0644c

View File

@ -1476,8 +1476,9 @@ multipress_gesture_pressed_cb (GtkGestureMultiPress *gesture,
if (n_press == 1)
priv->drag_possible = TRUE;
gtk_gesture_set_sequence_state (GTK_GESTURE (gesture),
sequence, GTK_EVENT_SEQUENCE_CLAIMED);
if (gtk_widget_has_grab (widget))
gtk_gesture_set_sequence_state (GTK_GESTURE (gesture),
sequence, GTK_EVENT_SEQUENCE_CLAIMED);
break;
default:
if (!priv->maximized)