[gtk/dnd-gestures-2] 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] popover: Use g_signal_connect_object on parent widget signal
- Date: Mon, 6 Jan 2020 05:47:53 +0000 (UTC)
commit 549e2460345d395800c7752620c006587996731f
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]