summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkwidget.c5
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);
}
/**