mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
popover: Allocate after setting final_position
When we find out that we've been flipped, set final_position and final_rect before allocating the popover. This prevents 'smashed-in beak' disease. Fixes: #2671
This commit is contained in:
parent
12adf6362f
commit
473709fee3
@ -379,11 +379,6 @@ update_popover_layout (GtkPopover *popover,
|
|||||||
did_flip_vertically (gdk_popup_layout_get_surface_anchor (layout),
|
did_flip_vertically (gdk_popup_layout_get_surface_anchor (layout),
|
||||||
gdk_popup_get_surface_anchor (popup));
|
gdk_popup_get_surface_anchor (popup));
|
||||||
|
|
||||||
gtk_widget_allocate (GTK_WIDGET (popover),
|
|
||||||
gdk_surface_get_width (priv->surface),
|
|
||||||
gdk_surface_get_height (priv->surface),
|
|
||||||
-1, NULL);
|
|
||||||
|
|
||||||
priv->final_rect = final_rect;
|
priv->final_rect = final_rect;
|
||||||
|
|
||||||
switch (priv->position)
|
switch (priv->position)
|
||||||
@ -405,6 +400,11 @@ update_popover_layout (GtkPopover *popover,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gtk_widget_allocate (GTK_WIDGET (popover),
|
||||||
|
gdk_surface_get_width (priv->surface),
|
||||||
|
gdk_surface_get_height (priv->surface),
|
||||||
|
-1, NULL);
|
||||||
|
|
||||||
g_clear_pointer (&priv->arrow_render_node, gsk_render_node_unref);
|
g_clear_pointer (&priv->arrow_render_node, gsk_render_node_unref);
|
||||||
gtk_widget_queue_draw (GTK_WIDGET (popover));
|
gtk_widget_queue_draw (GTK_WIDGET (popover));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user