[gtk/wip/matthiasc/popup2: 346/353] widget: Use root pointer focus apis



commit 1f314e0373bccc53b80a455a36275e0f75844992
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Mar 17 09:26:55 2019 -0400

    widget: Use root pointer focus apis

 gtk/gtkwidget.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index fe831a9df4..ab8d0e7c88 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3313,11 +3313,8 @@ update_cursor_on_state_change (GtkWidget *widget)
   GtkWidget *toplevel;
 
   toplevel = gtk_widget_get_toplevel (widget);
-  if (!GTK_IS_WINDOW (toplevel))
-    return;
-
-  gtk_window_update_pointer_focus_on_state_change (GTK_WINDOW (toplevel),
-                                                   widget);
+  if (GTK_IS_ROOT (toplevel))
+    gtk_root_update_pointer_focus_on_state_change (GTK_ROOT (toplevel), widget);
 }
 
 /**


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