From 81cf12098308b7961c19b56aa96ff22ff7226d25 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Mon, 24 Aug 2026 21:25:50 +0200 Subject: [PATCH] quickscreen: always refresh SBS when leaving Eliminate special case for transition to the Shortcuts menu. The SBS refresh doesn't cause a screen update anymore, and has negligible cost, so do it regardless. Reverts the changes to quickscreen.c introduced in commit dfd9c10 ("Eliminate skin updates in between activities") + simplify quickscreen_draw_item (no effect on behavior) Change-Id: I3fca976de554c720cb69a41566fd0d0a7e6ea92d --- apps/gui/quickscreen.c | 26 ++++++++++++-------------- apps/playlist_viewer.c | 12 ++++-------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index 2c82c6b6fe..90bbde6db6 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c @@ -185,14 +185,14 @@ static void quickscreen_fix_viewports(struct quickscreen *qs, enum screen_type s vps[QUICKSCREEN_RIGHT].flags |= VP_FLAG_ALIGN_RIGHT; } -/* Draw QS item into current viewport */ -static void quickscreen_draw_item(struct quickscreen *qs, struct screen *display, - enum quickscreen_item i, bool single_line) +/* Draw settings item into current viewport */ +static void quickscreen_draw_setting(const struct settings_list *item, + struct screen *display, bool single_line) { char buf[MAX_PATH]; - const char *title = P2STR(ID2P(qs->items[i]->lang_id)); - const char *value = option_get_valuestring(qs->items[i], buf, sizeof buf, - option_value_as_int(qs->items[i])); + const char *title = P2STR(ID2P(item->lang_id)); + const char *value = option_get_valuestring(item, buf, sizeof buf, + option_value_as_int(item)); if (single_line) { char text[MAX_PATH]; @@ -222,7 +222,8 @@ static void quickscreen_update(struct quickscreen *qs, enum quickscreen_item sel { struct viewport *last_vp = display->set_viewport(&vps[i]); display->clear_viewport(); - quickscreen_draw_item(qs, display, i, viewport_get_nb_lines(&vps[i]) < 2); + quickscreen_draw_setting(qs->items[i], display, + viewport_get_nb_lines(&vps[i]) < 2); display->set_viewport(last_vp); } @@ -244,7 +245,8 @@ static void quickscreen_draw(struct quickscreen *qs, enum screen_type screen) if (qs->items[i]) { display->set_viewport(&vps[i]); - quickscreen_draw_item(qs, display, i, viewport_get_nb_lines(&vps[i]) < 2); + quickscreen_draw_setting(qs->items[i], display, + viewport_get_nb_lines(&vps[i]) < 2); } /* icons */ @@ -389,13 +391,9 @@ static void cleanup(void *parameter) if (!qs_skinned[i]) FOR_QS_ITEMS(j) screens[i].scroll_stop_viewport(&qs->vps[i][j]); - viewportmanager_theme_undo(i, !(qs->result & QUICKSCREEN_GOTO_SHORTCUTS_MENU)); + viewportmanager_theme_undo(i, true); } - /* Eliminate flashing of parent during transition to Shortcuts */ - if (qs->result & QUICKSCREEN_GOTO_SHORTCUTS_MENU) - pop_current_activity_without_refresh(); - else - pop_current_activity(); + pop_current_activity(); } /* Set up activity, viewport, and event listener. Draw initial Quickscreen. */ diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 827ceb4b1b..e35700732c 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -1151,16 +1151,12 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename, goto exit; #ifdef HAVE_QUICKSCREEN case ACTION_STD_QUICKSCREEN: + /* Shortcuts menu currently disabled in Playlist Viewer */ if (!global_settings.shortcuts_replaces_qs) { - if (quickscreen_show(button) == - QUICKSCREEN_GOTO_SHORTCUTS_MENU) /* currently disabled */ - { - /* QuickScreen defers skin updates when popping its activity - to switch to Shortcuts Menu, so make up for that here: */ - FOR_NB_SCREENS(i) - skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); - } + /* QUICKSCREEN_GOTO_SHORTCUTS_MENU + return value ignored for now */ + quickscreen_show(button); update_playlist(true); update_gui(&playlist_lists, true); }