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: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/755>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user