From 440e9ecf5a6ae30763f298abe2f8ed215ce18362 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 23:27:21 -0700 Subject: [PATCH] =?UTF-8?q?=20=20=20=20Updated=20fe=5Fctrl=5Fgui()?= =?UTF-8?q?=E2=80=99s=20FE=5FGUI=5FAPPLY=20branch=20to=20match=20the=20Pre?= =?UTF-8?q?ferences=20=E2=86=92=20Theme=20apply=20sequence=20by=20loading?= =?UTF-8?q?=20palette=20data=20first,=20then=20re-applying=20current=20dar?= =?UTF-8?q?k-mode=20state,=20and=20only=20then=20calling=20setup=5Fapply?= =?UTF-8?q?=5Freal(TRUE,=20TRUE,=20TRUE,=20FALSE);.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added an inline regression-prevention comment noting this path should stay in parity with setup_theme_apply_cb. Verified palette.h is already included in src/fe-gtk/fe-gtk.c (no include changes required). --- src/fe-gtk/fe-gtk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index 465bcdf8..526baa3c 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -1588,6 +1588,9 @@ fe_ctrl_gui (session *sess, fe_gui_action action, int arg) mg_detach (sess, arg); /* arg: 0=toggle 1=detach 2=attach */ break; case FE_GUI_APPLY: + /* Keep parity with Preferences -> Theme apply path (setup_theme_apply_cb). */ + palette_load (); + palette_apply_dark_mode (fe_dark_mode_is_enabled ()); setup_apply_real (TRUE, TRUE, TRUE, FALSE); } }