diff options
author | Thomas Martitz <kugel@rockbox.org> | 2014-01-15 18:57:46 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-01-15 18:57:46 +0100 |
commit | 2eb873cea62805f232e4633c73e67c4e2b116cd4 (patch) | |
tree | f9cd0729fe5406e96aa11dd279a89294beeaecb3 | |
parent | 644d9eab6c55c736e72afdb4a8f3432a07d8fc11 (diff) | |
download | rockbox-2eb873cea62805f232e4633c73e67c4e2b116cd4.tar.gz rockbox-2eb873cea62805f232e4633c73e67c4e2b116cd4.zip |
skins: Update SBS when changing activities.
When changing activities (those that are indicated via %cs skin tag), the sbs
needs to be updated, so that the UI viewport can be applied before that
activity draws its UI.
Fixes FS#12804. I hope this commit doesn't have bad side effects.
Change-Id: If45654e356749f5f27991430dbd1da6f23e6f802
-rw-r--r-- | apps/gui/statusbar-skinned.c | 6 | ||||
-rw-r--r-- | apps/misc.c | 12 |
2 files changed, 13 insertions, 5 deletions
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c index fc9735da21..c991d8ea40 100644 --- a/apps/gui/statusbar-skinned.c +++ b/apps/gui/statusbar-skinned.c | |||
@@ -170,9 +170,9 @@ void sb_skin_update(enum screen_type screen, bool force) | |||
170 | if (lcd_active() || (i != SCREEN_MAIN)) | 170 | if (lcd_active() || (i != SCREEN_MAIN)) |
171 | #endif | 171 | #endif |
172 | { | 172 | { |
173 | bool full_update = skin_do_full_update(CUSTOM_STATUSBAR, screen); | 173 | if (force) |
174 | skin_update(CUSTOM_STATUSBAR, screen, force || | 174 | skin_request_full_update(CUSTOM_STATUSBAR); |
175 | full_update ? SKIN_REFRESH_ALL : SKIN_REFRESH_NON_STATIC); | 175 | skin_update(CUSTOM_STATUSBAR, screen, SKIN_REFRESH_NON_STATIC); |
176 | } | 176 | } |
177 | next_update[i] = current_tick + update_delay; /* don't update too often */ | 177 | next_update[i] = current_tick + update_delay; /* don't update too often */ |
178 | } | 178 | } |
diff --git a/apps/misc.c b/apps/misc.c index fa33bb5c4f..d63676eb89 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -1214,18 +1214,26 @@ static int current_activity_top = 0; | |||
1214 | void push_current_activity(enum current_activity screen) | 1214 | void push_current_activity(enum current_activity screen) |
1215 | { | 1215 | { |
1216 | current_activity[current_activity_top++] = screen; | 1216 | current_activity[current_activity_top++] = screen; |
1217 | #if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__) | ||
1218 | FOR_NB_SCREENS(i) | 1217 | FOR_NB_SCREENS(i) |
1218 | { | ||
1219 | #if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__) | ||
1219 | skinlist_set_cfg(i, NULL); | 1220 | skinlist_set_cfg(i, NULL); |
1220 | #endif | 1221 | #endif |
1222 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | ||
1223 | } | ||
1221 | } | 1224 | } |
1225 | |||
1222 | void pop_current_activity(void) | 1226 | void pop_current_activity(void) |
1223 | { | 1227 | { |
1224 | current_activity_top--; | 1228 | current_activity_top--; |
1225 | #if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__) | ||
1226 | FOR_NB_SCREENS(i) | 1229 | FOR_NB_SCREENS(i) |
1230 | { | ||
1231 | #if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__) | ||
1227 | skinlist_set_cfg(i, NULL); | 1232 | skinlist_set_cfg(i, NULL); |
1228 | #endif | 1233 | #endif |
1234 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | ||
1235 | } | ||
1236 | |||
1229 | } | 1237 | } |
1230 | enum current_activity get_current_activity(void) | 1238 | enum current_activity get_current_activity(void) |
1231 | { | 1239 | { |