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

Submitted by Nobuhiko Tanibata on Nov. 25, 2015, 2:36 p.m.

Details

Message ID 1448462169-5978-1-git-send-email-nobuhiko_tanibata@xddp.denso.co.jp
State Accepted
Commit 3e710d19fe663c7fca39053eb06b5667adabd7b0
Headers show
Series "fix bugs and TODO to support multi screens" ( rev: 1 ) in Wayland (DEPRECATED)

Not browsing as part of any series.

Commit Message

Nobuhiko Tanibata Nov. 25, 2015, 2:36 p.m.
From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>

It just return the first screen found in screen list.

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

Patch hide | download patch | download mbox

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;