From 6f2726e79a84e51a53390c6d1d2966a6c26434af Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 18 Mar 2014 12:24:44 +0100 Subject: usb screen: Stop scrolling the entire display. It's not easy for the originating screen to perform cleanup in case of USB because the usb screen is invoked indirectly via default_event_handler(). To avoid stale scrolling lines perform the cleanup in the usb screen itself. Side effect should be no worse than scrolling lines to restart in SBSes that show during USB. Change-Id: I9aa491b3d4b649c0b3be70048ebcb9d817c0356c --- apps/gui/usb_screen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c index 569e694870..20af4dc3da 100644 --- a/apps/gui/usb_screen.c +++ b/apps/gui/usb_screen.c @@ -264,8 +264,12 @@ void gui_usb_screen_run(bool early_usb) FOR_NB_SCREENS(i) { struct screen *screen = &screens[i]; - + /* we might be coming from anywhere, and the originating screen + * can't be practically expected to cleanup the UI because + * we're invoked via default_event_handler(), therefore we make a + * generic cleanup here */ screen->set_viewport(NULL); + screen->scroll_stop(); #ifdef HAVE_LCD_CHARCELLS /* Quick fix. Viewports should really be enabled proper for charcell */ viewport_set_defaults(&usb_screen_vps_ar[i].parent, i); -- cgit v1.2.3