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



commit edc41eaa0e040ce4aaaf8376fe102d1ce1eb3e53
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 07d78cac9a..47422d0991 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3387,11 +3387,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]