[gtk/wip/matthiasc/popup5: 98/128] event controller: Use gtk_widget_get_native



commit ca1450f90917e7dc372fea7c2078822123b43e9e
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu May 2 17:33:21 2019 -0400

    event controller: Use gtk_widget_get_native

 gtk/gtkeventcontroller.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkeventcontroller.c b/gtk/gtkeventcontroller.c
index 5f3635cf74..11e4372517 100644
--- a/gtk/gtkeventcontroller.c
+++ b/gtk/gtkeventcontroller.c
@@ -92,12 +92,12 @@ gtk_event_controller_filter_event_default (GtkEventController *self,
       GtkWidget *native2;
       GtkWidget *target;
 
-      native = gtk_widget_get_ancestor (priv->widget, GTK_TYPE_NATIVE);
+      native = GTK_WIDGET (gtk_widget_get_native (priv->widget));
 
       target = GTK_WIDGET (gdk_event_get_target (event));
       if (target)
         {
-          native2 = gtk_widget_get_ancestor (target, GTK_TYPE_NATIVE);
+          native2 = GTK_WIDGET (gtk_widget_get_native (target));
           if (native == native2)
             return FALSE;
         }
@@ -105,7 +105,7 @@ gtk_event_controller_filter_event_default (GtkEventController *self,
       target = GTK_WIDGET (gdk_event_get_related_target (event));
       if (target)
         {
-          native2 = gtk_widget_get_ancestor (target, GTK_TYPE_NATIVE);
+          native2 = GTK_WIDGET (gtk_widget_get_native (target));
           if (native == native2)
             return FALSE;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]