From 11d37c506779ac9979725f67ed5bf0fd0c602d71 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Sun, 18 Jan 1998 15:09:10 +0000 Subject: gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c Sun Jan 18 09:57:00 1998 Owen Taylor * gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c gtkfixed.c gtkhandlebox.c gtkhscale.c gtkhscrollbar.c gtkitem.c gtklist.c gtkmenushell.c gtkmisc.c gtknotebook.c gtkpaned.c gtkpreview.c gtkprogressbar.c gtkruler.c gtktext.c gtktree.c gtkviewport.c gtkvscale.c gtkvscrollbar.c gtkwidget.{c,h} Added gtk_widget_set_parent and gtk_widget_get_parent. All widgets should use: gtk_widget_get_parent() instead of widget->parent->window. Any widget that wants to have children not in the parent window, should use gtk_widget_set_parent () in their realize() and add () routines. CList and Viewport widgets changed to do this. (Viewport widget using code from gtk-fortier-980117-0.patch.) --- gtk/gtkeventbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gtk/gtkeventbox.c') diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c index daec6c2266..ac9d8746da 100644 --- a/gtk/gtkeventbox.c +++ b/gtk/gtkeventbox.c @@ -112,7 +112,7 @@ gtk_event_box_realize (GtkWidget *widget) 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); -- cgit v1.2.1