From 4da8d39ec5521a9d1d5dfdfbf0640ca16c322674 Mon Sep 17 00:00:00 2001 From: robxnano <91250-robxnano@users.noreply.gitlab.gnome.org> Date: Thu, 14 Dec 2023 18:47:28 +0000 Subject: [PATCH] MenuSectionBox: Increase priority of separator sync function This ensures that the separators are made visible before a popover menu is shown. Previously the menu would jump in size after it appeared. Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/5166 --- gtk/gtkmenusectionbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c index 90e07a4480..0342d4eff0 100644 --- a/gtk/gtkmenusectionbox.c +++ b/gtk/gtkmenusectionbox.c @@ -173,7 +173,7 @@ gtk_menu_section_box_schedule_separator_sync (GtkMenuSectionBox *box) if (!box->separator_sync_idle) { - box->separator_sync_idle = g_idle_add_full (G_PRIORITY_HIGH_IDLE, /* before resize... */ + box->separator_sync_idle = g_idle_add_full (G_PRIORITY_DEFAULT, /* before menu is drawn... */ gtk_menu_section_box_handle_sync_separators, box, NULL); gdk_source_set_static_name_by_id (box->separator_sync_idle, "[gtk] menu section box handle sync separators");