[gtk/wip/carlosg/input-cleanups: 14/26] gtkwindowhandle: Drop has-grab checks
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/input-cleanups: 14/26] gtkwindowhandle: Drop has-grab checks
- Date: Wed, 24 Jun 2020 18:37:40 +0000 (UTC)
commit 803103640af7fc8258253f3046ed4159c2589b98
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 24 13:41:28 2020 +0200
gtkwindowhandle: Drop has-grab checks
While it's worth thinking about bringing the "windows can be dragged
with open popovers" behavior back, this does not kick in anymore, nor
should be the way to handle this given all the autoclose surface
semantic changes.
gtk/gtkwindowhandle.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkwindowhandle.c b/gtk/gtkwindowhandle.c
index 47bccbdc97..3d28d28b2f 100644
--- a/gtk/gtkwindowhandle.c
+++ b/gtk/gtkwindowhandle.c
@@ -328,13 +328,11 @@ click_gesture_pressed_cb (GtkGestureClick *gesture,
GdkEventSequence *sequence;
GdkEvent *event;
guint button;
- GtkRoot *root;
widget = GTK_WIDGET (self);
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
- root = gtk_widget_get_root (widget);
if (!event)
return;
@@ -355,9 +353,8 @@ click_gesture_pressed_cb (GtkGestureClick *gesture,
if (n_press == 2)
perform_titlebar_action (self, event, button, n_press);
- if (gtk_widget_has_grab (GTK_WIDGET (root)))
- gtk_gesture_set_sequence_state (GTK_GESTURE (gesture),
- sequence, GTK_EVENT_SEQUENCE_CLAIMED);
+ gtk_gesture_set_sequence_state (GTK_GESTURE (gesture),
+ sequence, GTK_EVENT_SEQUENCE_CLAIMED);
break;
case GDK_BUTTON_SECONDARY:
@@ -420,7 +417,6 @@ drag_gesture_update_cb (GtkGestureDrag *gesture,
* widget from doing anything.
*/
if (event_widget != GTK_WIDGET (self) &&
- !gtk_widget_has_grab (event_widget) &&
gtk_widget_consumes_motion (event_widget, GTK_WIDGET (self), sequence))
{
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]