Beispiel #1
0
static void
real_queue_resize (GtkWidget *widget)
{
  GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED);
  GTK_PRIVATE_SET_FLAG (widget, GTK_REQUEST_NEEDED);
  
  if (widget->parent)
    _gtk_container_queue_resize (GTK_CONTAINER (widget->parent));
  else if (gtk_widget_is_toplevel (widget) && GTK_IS_CONTAINER (widget))
    _gtk_container_queue_resize (GTK_CONTAINER (widget));
}
Beispiel #2
0
static void
real_queue_resize (GtkWidget          *widget,
		   GtkQueueResizeFlags flags)
{
  GtkWidget *container;

  _gtk_widget_set_alloc_needed (widget, TRUE);
  _gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (widget));

  container = gtk_widget_get_parent (widget);
  if (!container &&
      gtk_widget_is_toplevel (widget) && GTK_IS_CONTAINER (widget))
    container = widget;

  if (container)
    {
      if (flags & GTK_QUEUE_RESIZE_INVALIDATE_ONLY)
	_gtk_container_resize_invalidate (GTK_CONTAINER (container));
      else
	_gtk_container_queue_resize (GTK_CONTAINER (container));
    }
}