From 2ab627d3097ac7098741a724fc27b1c261473d4f Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 4 Sep 2009 00:40:50 +0000 Subject: Change r22610 a bit. The new parent viewport isn't really suitable. The new parent might be smaller than the previous one, causing the old list to not stop scrolling. Full-screen stop scrolling isn't correct either though, so we pick the currnet ui viewport to stop scrolling. This was actually a bug (attempted to fix in r22610) discovered in the custom statusbar patch, where the lists stopped the statusbar text from scrolling. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22613 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/bitmap/list.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 046621e8f3..c474c329ff 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c @@ -104,6 +104,9 @@ void list_draw(struct screen *display, struct gui_synclist *list) const bool show_cursor = !global_settings.cursor_style && list->show_selection_marker; struct viewport *parent = (list->parent[screen]); + /* the below returns a pointer to a viewport array which is + * NB_SCREENS long */ + struct viewport *ui_vp = viewport_get_current_vp(); #ifdef HAVE_LCD_COLOR unsigned char cur_line = 0; #endif @@ -112,7 +115,7 @@ void list_draw(struct screen *display, struct gui_synclist *list) line_height = font_get(parent->font)->height; display->set_viewport(parent); display->clear_viewport(); - display->scroll_stop(parent); + display->scroll_stop(&ui_vp[screen]); list_text[screen] = *parent; if ((show_title = draw_title(display, list))) { -- cgit v1.2.3