forked from AuroraMiddleware/gtk
popover: Use g_signal_connect_object on parent widget signal
The popover may be destroyed, leaving this dangling signal. This may cause crashes on future parent widget resizes.
This commit is contained in:
parent
508570864d
commit
dbb3727b03
@ -1482,7 +1482,8 @@ gtk_popover_set_relative_to (GtkPopover *popover,
|
||||
|
||||
if (priv->relative_to)
|
||||
{
|
||||
g_signal_connect (priv->relative_to, "size-allocate", G_CALLBACK (size_changed), popover);
|
||||
g_signal_connect_object (priv->relative_to, "size-allocate",
|
||||
G_CALLBACK (size_changed), popover, 0);
|
||||
gtk_css_node_set_parent (gtk_widget_get_css_node (GTK_WIDGET (popover)),
|
||||
gtk_widget_get_css_node (relative_to));
|
||||
gtk_widget_set_parent (GTK_WIDGET (popover), relative_to);
|
||||
|
Loading…
Reference in New Issue
Block a user