mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 16:30:15 +00:00
Merge branch 'popover-state-sync' into 'gtk-3-24'
popover: Sync parent state when needed See merge request GNOME/gtk!931
This commit is contained in:
commit
b6c9d23b9a
@ -2069,6 +2069,7 @@ gtk_popover_update_relative_to (GtkPopover *popover,
|
||||
GtkWidget *relative_to)
|
||||
{
|
||||
GtkPopoverPrivate *priv = popover->priv;
|
||||
GtkStateFlags old_state = 0;
|
||||
|
||||
if (priv->widget == relative_to)
|
||||
return;
|
||||
@ -2085,6 +2086,7 @@ gtk_popover_update_relative_to (GtkPopover *popover,
|
||||
|
||||
if (priv->widget)
|
||||
{
|
||||
old_state = gtk_widget_get_state_flags (priv->widget);
|
||||
if (g_signal_handler_is_connected (priv->widget, priv->hierarchy_changed_id))
|
||||
g_signal_handler_disconnect (priv->widget, priv->hierarchy_changed_id);
|
||||
if (g_signal_handler_is_connected (priv->widget, priv->size_allocate_id))
|
||||
@ -2141,6 +2143,9 @@ gtk_popover_update_relative_to (GtkPopover *popover,
|
||||
if (priv->widget)
|
||||
gtk_popover_update_scrollable (popover);
|
||||
|
||||
if (priv->widget)
|
||||
_gtk_popover_parent_state_changed (priv->widget, old_state, popover);
|
||||
|
||||
_gtk_widget_update_parent_muxer (GTK_WIDGET (popover));
|
||||
g_object_unref (popover);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user