summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-06-03 00:28:58 +0200
committerJavier Jardón <jjardon@gnome.org>2010-07-13 19:40:46 +0200
commitdfb24fd56e8215f0bbf89f0361441af05920b780 (patch)
tree8be9486e38af2c66b2399512188fad81c2f66a91
parent3a10216dd01c8d10df235b88c8942b2fda15689b (diff)
downloadgtk+-dfb24fd56e8215f0bbf89f0361441af05920b780.tar.gz
gtkcontainer: Add _gtk_container_*_need_resize internal accessors
gtkoffscreenwindow and gtkwindow need access to need_resize var
-rw-r--r--gtk/gtkcontainer.c13
-rw-r--r--gtk/gtkcontainer.h4
-rw-r--r--gtk/gtkoffscreenwindow.c4
-rw-r--r--gtk/gtkwindow.c4
4 files changed, 20 insertions, 5 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index afd2315c7c..2ce2b4f155 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -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;
+}
diff --git a/gtk/gtkcontainer.h b/gtk/gtkcontainer.h
index a1c3a52068..bb4f5469bf 100644
--- a/gtk/gtkcontainer.h
+++ b/gtk/gtkcontainer.h
@@ -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
diff --git a/gtk/gtkoffscreenwindow.c b/gtk/gtkoffscreenwindow.c
index 7e05fcb049..417003b8fc 100644
--- a/gtk/gtkoffscreenwindow.c
+++ b/gtk/gtkoffscreenwindow.c
@@ -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);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 1ef066c2af..e5ee01ca0c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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)
{