From b15d557106f35fe9dd0c9fc97339a269de276d72 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Fri, 13 Sep 2024 17:16:29 +0200 Subject: [PATCH] record-row: Only popup context menu if row is realized This works around the long press gesture (mis?) firing the "press" signal on a row that is not realized anymore (because the slice model in the history box currently rebuilds all rows when the items change). Fixes: https://gitlab.gnome.org/GNOME/calls/-/issues/666 Part-of: --- src/calls-call-record-row.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/calls-call-record-row.c b/src/calls-call-record-row.c index 83dffa2..e5dd251 100644 --- a/src/calls-call-record-row.c +++ b/src/calls-call-record-row.c @@ -384,6 +384,11 @@ on_long_pressed (GtkGestureLongPress *gesture, gdouble y, GtkWidget *self) { + if (!gtk_widget_get_realized (self)) { + g_warning ("widget is not realized, why does it emit 'pressed'? Aborting.."); + return; + } + context_menu (self, NULL); }