Index: apps/gui/gwps.c =================================================================== --- apps/gui/gwps.c (Revision 20662) +++ apps/gui/gwps.c (Arbeitskopie) @@ -208,6 +208,17 @@ #endif } +#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) +/* If the user is unable to see the wps, because the display is deactivated, + * we surpress updates */ +static void wps_lcd_activation_hook(void) +{ + /* issue an update */ + wps_state.do_full_update = true; + /* force timeout, so that the update is instantly */ + queue_post(&button_queue, BUTTON_NONE, 0); +} +#endif static void gwps_leave_wps(void) { @@ -225,6 +236,9 @@ show_remote_main_backdrop(); #endif viewportmanager_set_statusbar(oldbars); +#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) + lcd_activation_set_hook(NULL); +#endif } void gwps_draw_statusbars(void) @@ -663,8 +677,16 @@ if (wps_state.do_full_update || update) { FOR_NB_SCREENS(i) +#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) + if (lcd_active() +#ifdef HAVE_REMOTE_LCD + /* currently, all remotes are readable without backlight */ + && (i == SCREEN_MAIN) +#endif + ) +#endif { - gui_wps_update(&gui_wps[i]); + gui_wps_update(&gui_wps[i]); } wps_state.do_full_update = false; update = false; @@ -677,6 +699,9 @@ restore = false; restoretimer = RESTORE_WPS_INSTANTLY; gwps_fix_statusbars(); +#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) + lcd_activation_set_hook(wps_lcd_activation_hook); +#endif FOR_NB_SCREENS(i) { screens[i].stop_scroll();