[gtk/wip/carlosg/input-cleanups: 22/26] gtkwidget: Drop internal checks in grab-notify
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/input-cleanups: 22/26] gtkwidget: Drop internal checks in grab-notify
- Date: Wed, 24 Jun 2020 18:38:20 +0000 (UTC)
commit 1c5cf17f1cb90c1a9b0e032df4a16e93c518acc8
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 24 17:23:11 2020 +0200
gtkwidget: Drop internal checks in grab-notify
There's no need to check if the widget is already shadowed, we
implicitly have that from the signal argument.
gtk/gtkwidget.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index af767f318a..fcd5bdec25 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -823,17 +823,12 @@ _gtk_widget_grab_notify (GtkWidget *widget,
if (!priv->controllers)
return;
+ if (was_grabbed)
+ return;
for (i = (int)priv->controllers->len - 1; i >= 0; i--)
{
GtkEventController *controller = g_ptr_array_index (priv->controllers, i);
- GdkDevice *device = NULL;
-
- if (GTK_IS_GESTURE (controller))
- device = gtk_gesture_get_device (GTK_GESTURE (controller));
-
- if (!device || !gtk_widget_device_is_shadowed (widget, device))
- continue;
gtk_event_controller_reset (controller);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]