summaryrefslogtreecommitdiff
path: root/gtk/gtktooltip.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-08-05 00:12:41 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-08-05 00:12:41 -0400
commitdcdb00adb4be64768583eb3f0d301a931d7694d4 (patch)
treeca2db70053e70e60aa071a1a7a70846078c440bd /gtk/gtktooltip.c
parent92d34337f74c4d4373ff55b117d19d57afe222e1 (diff)
downloadgtk+-dcdb00adb4be64768583eb3f0d301a931d7694d4.tar.gz
Avoid warnings with tooltips on toplevels
This was reported for tooltips on statusicons in bug 625235, but it was affecting regular toplevel windows as well.
Diffstat (limited to 'gtk/gtktooltip.c')
-rw-r--r--gtk/gtktooltip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 3a50fc05b8..c75f251a8c 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -876,6 +876,8 @@ get_bounding_box (GtkWidget *widget,
gint x4, y4;
window = gtk_widget_get_parent_window (widget);
+ if (window == NULL)
+ window = gtk_widget_get_window (widget);
x = widget->allocation.x;
y = widget->allocation.y;