[PATCH weston 1/4] ivi-shell: fix TODO which expects only one screen in the system.

Nobuhiko Tanibata nobuhiko_tanibata at xddp.denso.co.jp
Wed Nov 25 06:36:09 PST 2015


From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp>

It just return the first screen found in screen list.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 ivi-shell/ivi-layout.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index c6d4b90..23ce67b 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1323,9 +1323,8 @@ ivi_layout_get_screen_from_id(uint32_t id_screen)
 	struct ivi_layout_screen *iviscrn = NULL;
 
 	wl_list_for_each(iviscrn, &layout->screen_list, link) {
-/* FIXME : select iviscrn from screen_list by id_screen */
-		return iviscrn;
-		break;
+		if (iviscrn->id_screen == id_screen)
+			return iviscrn;
 	}
 
 	return NULL;
-- 
1.8.3.1



More information about the wayland-devel mailing list