[gtk/drag-icon: 4/7] widget: Be more careful with roots
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/drag-icon: 4/7] widget: Be more careful with roots
- Date: Mon, 30 Dec 2019 06:15:35 +0000 (UTC)
commit 9ba184adf7aa599e516fb35daafc79ac7117f0d4
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 30 00:24:32 2019 -0500
widget: Be more careful with roots
We were assuming that all roots are windows,
and calling GtkWindow apis on them.
gtk/gtkwidget.c | 5 ++---
1 file 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);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]