Commit dfb24fd5 authored by Javier Jardón's avatar Javier Jardón

gtkcontainer: Add _gtk_container_*_need_resize internal accessors

gtkoffscreenwindow and gtkwindow need access to need_resize var
parent 3a10216d
......@@ -2683,3 +2683,16 @@ gtk_container_propagate_expose (GtkContainer *container,
gdk_event_free (child_event);
}
}
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;
}
......@@ -208,7 +208,9 @@ 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);
G_END_DECLS
......
......@@ -184,8 +184,8 @@ gtk_offscreen_window_show (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
container = GTK_CONTAINER (widget);
need_resize = container->need_resize || !gtk_widget_get_realized (widget);
container->need_resize = FALSE;
need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget);
_gtk_container_set_need_resize (container, FALSE);
if (need_resize)
gtk_offscreen_window_resize (widget);
......
......@@ -4464,8 +4464,8 @@ gtk_window_show (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
need_resize = container->need_resize || !gtk_widget_get_realized (widget);
container->need_resize = FALSE;
need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget);
_gtk_container_set_need_resize (container, FALSE);
if (need_resize)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment