mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 05:50:10 +00:00
popover: Avoid unnecessary work
If the popover isn't visible, no need to do any extra 'cascade' work. This also helps to avoid running into trouble during finalization when the parents are already gone.
This commit is contained in:
parent
3bd609d77c
commit
4c295dc49c
@ -2411,6 +2411,9 @@ gtk_popover_popdown (GtkPopover *popover)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_POPOVER (popover));
|
||||
|
||||
if (!gtk_widget_get_visible (GTK_WIDGET (popover)))
|
||||
return;
|
||||
|
||||
gtk_widget_set_visible (GTK_WIDGET (popover), FALSE);
|
||||
|
||||
cascade_popdown (popover);
|
||||
|
Loading…
Reference in New Issue
Block a user