Touchscreen: Check if click is outside of list. Fixes FS#12669

Change-Id: Ic036f4c399b89c65bdc43bfdf7111bf4a13be484
This commit is contained in:
Thomas Martitz 2012-05-13 19:09:12 +02:00
parent 6b8330d216
commit 8689bcc186

View file

@ -740,6 +740,8 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * list)
line = (adj_y - y_offset) / line_height; line = (adj_y - y_offset) / line_height;
if (list_display_title(list, screen)) if (list_display_title(list, screen))
line -= 1; /* adjust for the list title */ line -= 1; /* adjust for the list title */
if (line >= list->nb_items)
return ACTION_NONE;
list->selected_item = list_start_item+line; list->selected_item = list_start_item+line;
gui_synclist_speak_item(list); gui_synclist_speak_item(list);
} }