1
0
Fork 0
forked from len0rd/rockbox

Eliminate SBS update on WPS exit

Prevents flashing an outdated backdrop when moving
from WPS to SBS, if both were using the extra
frame buffer (i.e. both used background viewports),
without having to update the SBS first. I think,
this is actually what we want, rather than commit
c1222d65e2, which attempted the same thing.

Change-Id: Iffc7fe2d351ebdf21a4e7629aba93641c0d30b50
This commit is contained in:
Christian Soffke 2025-03-22 16:11:40 +01:00
parent 7f9bf6d7d0
commit 18c8e554fd
2 changed files with 12 additions and 12 deletions

View file

@ -57,6 +57,7 @@
#include "language.h"
#include "statusbar-skinned.h"
#include "skin_engine/skin_engine.h"
#include "skin_engine/wps_internals.h"
#include "debug.h"
#define VPSTACK_DEPTH 16
@ -122,7 +123,17 @@ static void toggle_theme(enum screen_type screen, bool force)
/* remove the left overs from the previous screen.
* could cause a tiny flicker. Redo your screen code if that happens */
#ifdef HAVE_BACKDROP_IMAGE
skin_backdrop_show(sb_get_backdrop(screen));
int backdrop_id = sb_get_backdrop(screen);
if (get_current_activity() == ACTIVITY_WPS)
{
struct wps_data *sbs = skin_get_gwps(CUSTOM_STATUSBAR, screen)->data;
struct wps_data *wps = skin_get_gwps(WPS, screen)->data;
/* Extra framebuffer shared between WPS and SBS;
prevents flashing previous backdrop: */
if (wps->use_extra_framebuffer && sbs->use_extra_framebuffer)
backdrop_id = -1;
}
skin_backdrop_show(backdrop_id);
#endif
if (LIKELY(after_boot[screen]) && (!was_enabled[screen] || force))
{

View file

@ -542,18 +542,7 @@ static void gwps_leave_wps(bool theme_enabled)
struct gui_wps *gwps = skin_get_gwps(WPS, i);
gwps->display->scroll_stop();
if (theme_enabled)
{
#ifdef HAVE_BACKDROP_IMAGE
skin_backdrop_show(sb_get_backdrop(i));
/* The following is supposed to erase any traces of %VB
viewports drawn by the WPS. May need further thought... */
struct wps_data *sbs = skin_get_gwps(CUSTOM_STATUSBAR, i)->data;
if (gwps->data->use_extra_framebuffer && sbs->use_extra_framebuffer)
skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL);
#endif
viewportmanager_theme_undo(i, skin_has_sbs(gwps));
}
}
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)