summaryrefslogtreecommitdiff
path: root/gtk/gtkmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkmisc.c')
-rw-r--r--gtk/gtkmisc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkmisc.c b/gtk/gtkmisc.c
index 92ab64a49..94cd48925 100644
--- a/gtk/gtkmisc.c
+++ b/gtk/gtkmisc.c
@@ -157,7 +157,7 @@ gtk_misc_realize (GtkWidget *widget)
if (GTK_WIDGET_NO_WINDOW (widget))
{
- widget->window = widget->parent->window;
+ widget->window = gtk_widget_get_parent_window (widget);
widget->style = gtk_style_attach (widget->style, widget->window);
}
else
@@ -173,7 +173,7 @@ gtk_misc_realize (GtkWidget *widget)
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
- widget->window = gdk_window_new (widget->parent->window, &attributes, attributes_mask);
+ widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
gdk_window_set_user_data (widget->window, widget);
widget->style = gtk_style_attach (widget->style, widget->window);