diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index caeb2a5230..75c7d53a89 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -238,7 +238,6 @@ struct _GtkContainerPrivate guint border_width : 16; guint has_focus_chain : 1; - guint need_resize : 1; guint reallocate_redraws : 1; guint resize_mode : 2; guint request_mode : 2; @@ -1342,7 +1341,6 @@ gtk_container_init (GtkContainer *container) priv->focus_child = NULL; priv->border_width = 0; - priv->need_resize = FALSE; priv->resize_mode = GTK_RESIZE_PARENT; priv->reallocate_redraws = FALSE; } @@ -1724,14 +1722,6 @@ _gtk_container_queue_resize_internal (GtkContainer *container, break; } } - else - { - /* we need to let hidden resize containers know that something - * changed while they where hidden (currently only evaluated by - * toplevels). - */ - GTK_CONTAINER (widget)->priv->need_resize = TRUE; - } } } @@ -3346,19 +3336,6 @@ gtk_container_propagate_draw (GtkContainer *container, cairo_restore (cr); } -gboolean -_gtk_container_get_need_resize (GtkContainer *container) -{ - return container->priv->need_resize; -} - -void -_gtk_container_set_need_resize (GtkContainer *container, - gboolean need_resize) -{ - container->priv->need_resize = need_resize; -} - gboolean _gtk_container_get_reallocate_redraws (GtkContainer *container) { diff --git a/gtk/gtkcontainerprivate.h b/gtk/gtkcontainerprivate.h index d5a7e9f594..f96ae0bd27 100644 --- a/gtk/gtkcontainerprivate.h +++ b/gtk/gtkcontainerprivate.h @@ -34,9 +34,6 @@ GList * _gtk_container_focus_sort (GtkContainer *container, GList *children, GtkDirectionType direction, GtkWidget *old_focus); -gboolean _gtk_container_get_need_resize (GtkContainer *container); -void _gtk_container_set_need_resize (GtkContainer *container, - gboolean need_resize); gboolean _gtk_container_get_reallocate_redraws (GtkContainer *container); diff --git a/gtk/gtkoffscreenwindow.c b/gtk/gtkoffscreenwindow.c index 9a86e2ba9c..e5a33cca40 100644 --- a/gtk/gtkoffscreenwindow.c +++ b/gtk/gtkoffscreenwindow.c @@ -220,13 +220,10 @@ static void gtk_offscreen_window_show (GtkWidget *widget) { gboolean need_resize; - GtkContainer *container; _gtk_widget_set_visible_flag (widget, TRUE); - container = GTK_CONTAINER (widget); - need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget); - _gtk_container_set_need_resize (container, FALSE); + need_resize = _gtk_widget_get_alloc_needed (widget) || !gtk_widget_get_realized (widget); if (need_resize) gtk_offscreen_window_resize (widget); diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index b87c22e5f5..3b34ec8100 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -4805,8 +4805,7 @@ gtk_window_show (GtkWidget *widget) _gtk_widget_set_visible_flag (widget, TRUE); - need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget); - _gtk_container_set_need_resize (container, FALSE); + need_resize = _gtk_widget_get_alloc_needed (widget) || !gtk_widget_get_realized (widget); if (need_resize) {