popover: Always measure contents gizmo

Otherwise we're getting warnings about allocating a widget we haven't
measured first, which is fair. The contents gizmo itself will later take
care about whether or not the real popover child is NULL.
This commit is contained in:
Timm Bäder 2019-03-16 06:16:43 +01:00
parent 36e00ae95e
commit e657d9d553

View File

@ -1370,19 +1370,15 @@ gtk_popover_measure (GtkWidget *widget,
{
GtkPopover *popover = GTK_POPOVER (widget);
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
GtkWidget *child = gtk_bin_get_child (GTK_BIN (widget));
int minimal_size;
*minimum = 0;
*natural = 0;
if (child != NULL)
{
if (for_size >= 0)
for_size -= TAIL_HEIGHT;
if (for_size >= 0)
for_size -= TAIL_HEIGHT;
gtk_widget_measure (priv->contents_widget, orientation, for_size, minimum, natural, NULL, NULL);
}
gtk_widget_measure (priv->contents_widget, orientation, for_size, minimum, natural, NULL, NULL);
minimal_size = get_minimal_size (popover, orientation);
*minimum = MAX (*minimum, minimal_size);