gui/search-button: Disable popover arrow and guard markup escaping

The search suggestions popover is styled as a menu ("menu" style)
below the search entry. In recent GTK 4, when has-arrow is TRUE (the
default) and the popover has no arrow geometry or valid parent coordinates,
gtk_popover_create_arrow_path() returns NULL, leaving arrow_render_node NULL.
gtk_popover_snapshot() then appends NULL to the snapshot, causing a fatal
critical crash (GSK_IS_RENDER_NODE assertion failed) upon showing search results.

Setting "has-arrow: false" matches the menu popover design and avoids
the crash. Also guard escape_markup_cb() against NULL strings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/808>
This commit is contained in:
John Cardullo
2026-10-27 11:10:58 -07:00
parent c1eca94482
commit eeea79bb9f
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -76,6 +76,7 @@ template $GcalSearchButton: Adw.Bin {
Popover popover {
position: bottom;
autohide: false;
has-arrow: false;
default-widget: results_listview;
styles [
+3
View File
@@ -116,6 +116,9 @@ escape_markup_cb (GcalSearchHit *hit,
{
g_autofree gchar *escaped_string = NULL;
if (!string)
return NULL;
escaped_string = g_markup_escape_text (string, -1);
escaped_string = g_strstrip (escaped_string);