forked from AuroraMiddleware/gtk
Don't queue resize for hidden widgets without a size group
queue_resize basically tells the parent widget that it may need to pick a different size/layout. However, for a hidden child widget that should never be needed. It may be that the widget is in a sizegroup that has ignore_hidden == FALSE though, so it may affect the size group calculations. However, if a widget is not visible and not in a size group then its safe to avoid the resize, as the widget will be resized on becoming visible anyway. This avoids a lot of size allocation for hidden things like menus and tooltips.
This commit is contained in:
parent
47714f55ee
commit
faaae520c9
@ -4654,7 +4654,9 @@ gtk_widget_queue_resize (GtkWidget *widget)
|
||||
if (gtk_widget_get_realized (widget))
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
_gtk_size_group_queue_resize (widget, 0);
|
||||
if (gtk_widget_get_visible (widget) ||
|
||||
widget->priv->have_size_groups)
|
||||
_gtk_size_group_queue_resize (widget, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user