[gtk/dnd-gestures-2: 176/242] popover: Use g_signal_connect_object on parent widget signal
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 176/242] popover: Use g_signal_connect_object on parent widget signal
- Date: Tue, 7 Jan 2020 19:58:11 +0000 (UTC)
commit d6dac1b5656de03f731125d87c96aad958772dde
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jan 5 20:17:38 2020 +0100
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.
gtk/gtkpopover.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index bcda0fdd50..a963b35110 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]