diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-12-30 00:24:32 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-12-30 00:29:52 -0500 |
commit | 9ba184adf7aa599e516fb35daafc79ac7117f0d4 (patch) | |
tree | e6b5a73546b3caa41613bdc4124f1aa043d52c11 /gtk | |
parent | 710b8d7f40b9bcd26fa6c230e9a5c0e05ddabe47 (diff) | |
download | gtk+-9ba184adf7aa599e516fb35daafc79ac7117f0d4.tar.gz |
widget: Be more careful with roots
We were assuming that all roots are windows,
and calling GtkWindow apis on them.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkwidget.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 6ca66ade93..3d40eee3d1 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -3298,9 +3298,8 @@ update_cursor_on_state_change (GtkWidget *widget) GtkRoot *root; root = _gtk_widget_get_root (widget); - if (root) - gtk_window_update_pointer_focus_on_state_change (GTK_WINDOW (root), - widget); + if (GTK_IS_WINDOW (root)) + gtk_window_update_pointer_focus_on_state_change (GTK_WINDOW (root), widget); } /** |