forked from AuroraMiddleware/gtk
container: Remove duplicated flag
GtkContainer::need_resize and GtkWidget::alloc_needed are the same thing.
This commit is contained in:
parent
8bda7442c8
commit
090f30c559
@ -238,7 +238,6 @@ struct _GtkContainerPrivate
|
|||||||
guint border_width : 16;
|
guint border_width : 16;
|
||||||
|
|
||||||
guint has_focus_chain : 1;
|
guint has_focus_chain : 1;
|
||||||
guint need_resize : 1;
|
|
||||||
guint reallocate_redraws : 1;
|
guint reallocate_redraws : 1;
|
||||||
guint resize_mode : 2;
|
guint resize_mode : 2;
|
||||||
guint request_mode : 2;
|
guint request_mode : 2;
|
||||||
@ -1342,7 +1341,6 @@ gtk_container_init (GtkContainer *container)
|
|||||||
|
|
||||||
priv->focus_child = NULL;
|
priv->focus_child = NULL;
|
||||||
priv->border_width = 0;
|
priv->border_width = 0;
|
||||||
priv->need_resize = FALSE;
|
|
||||||
priv->resize_mode = GTK_RESIZE_PARENT;
|
priv->resize_mode = GTK_RESIZE_PARENT;
|
||||||
priv->reallocate_redraws = FALSE;
|
priv->reallocate_redraws = FALSE;
|
||||||
}
|
}
|
||||||
@ -1724,14 +1722,6 @@ _gtk_container_queue_resize_internal (GtkContainer *container,
|
|||||||
break;
|
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);
|
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
|
gboolean
|
||||||
_gtk_container_get_reallocate_redraws (GtkContainer *container)
|
_gtk_container_get_reallocate_redraws (GtkContainer *container)
|
||||||
{
|
{
|
||||||
|
@ -34,9 +34,6 @@ GList * _gtk_container_focus_sort (GtkContainer *container,
|
|||||||
GList *children,
|
GList *children,
|
||||||
GtkDirectionType direction,
|
GtkDirectionType direction,
|
||||||
GtkWidget *old_focus);
|
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);
|
gboolean _gtk_container_get_reallocate_redraws (GtkContainer *container);
|
||||||
|
|
||||||
|
|
||||||
|
@ -220,13 +220,10 @@ static void
|
|||||||
gtk_offscreen_window_show (GtkWidget *widget)
|
gtk_offscreen_window_show (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
gboolean need_resize;
|
gboolean need_resize;
|
||||||
GtkContainer *container;
|
|
||||||
|
|
||||||
_gtk_widget_set_visible_flag (widget, TRUE);
|
_gtk_widget_set_visible_flag (widget, TRUE);
|
||||||
|
|
||||||
container = GTK_CONTAINER (widget);
|
need_resize = _gtk_widget_get_alloc_needed (widget) || !gtk_widget_get_realized (widget);
|
||||||
need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget);
|
|
||||||
_gtk_container_set_need_resize (container, FALSE);
|
|
||||||
|
|
||||||
if (need_resize)
|
if (need_resize)
|
||||||
gtk_offscreen_window_resize (widget);
|
gtk_offscreen_window_resize (widget);
|
||||||
|
@ -4805,8 +4805,7 @@ gtk_window_show (GtkWidget *widget)
|
|||||||
|
|
||||||
_gtk_widget_set_visible_flag (widget, TRUE);
|
_gtk_widget_set_visible_flag (widget, TRUE);
|
||||||
|
|
||||||
need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget);
|
need_resize = _gtk_widget_get_alloc_needed (widget) || !gtk_widget_get_realized (widget);
|
||||||
_gtk_container_set_need_resize (container, FALSE);
|
|
||||||
|
|
||||||
if (need_resize)
|
if (need_resize)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user