[weston,10/11] ivi-shell: hmi-controller supports multi screens at fullscreen mode.

Submitted by Nobuhiko Tanibata on Dec. 9, 2015, 6:45 a.m.

Details

Message ID 1449643520-23314-1-git-send-email-nobuhiko_tanibata@xddp.denso.co.jp
State Accepted
Commit a7ffa68e700c17fe5723ce1ec6a2a3b31586d6b3
Headers show
Series "ivi-shell: multi screen supprot" ( rev: 2 ) in Wayland (DEPRECATED)

Not browsing as part of any series.

Commit Message

Nobuhiko Tanibata Dec. 9, 2015, 6:45 a.m.
From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>

It shows ivi applications in fullscreen per screen like,
The first screen: Application 1,4,5,6,,,,
The seconed screen: Application 2,
The third screen: Application 3

Thie mode assigns one application to each screen at first. And remaind
applications more than screens will be assigned to the first screen.

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

Patch hide | download patch | download mbox

diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
index 55e70fb..9b69dd2 100644
--- a/ivi-shell/hmi-controller.c
+++ b/ivi-shell/hmi-controller.c
@@ -367,6 +367,10 @@  mode_fullscreen_someone(struct hmi_controller *hmi_ctrl,
 	struct ivi_layout_surface *ivisurf  = NULL;
 	int32_t i = 0;
 	const uint32_t duration = hmi_ctrl->hmi_setting->transition_duration;
+	int32_t surf_num = 0;
+	struct ivi_layout_surface **surfaces;
+
+	surfaces = MEM_ALLOC(sizeof(*surfaces) * surface_length);
 
 	for (i = 0; i < surface_length; i++) {
 		ivisurf = pp_surface[i];
@@ -375,6 +379,18 @@  mode_fullscreen_someone(struct hmi_controller *hmi_ctrl,
 		if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
 			continue;
 
+		surfaces[surf_num++] = ivisurf;
+	}
+	ivi_layout_interface->layer_set_render_order(layer->ivilayer, surfaces, surf_num);
+
+	for (i = 0; i < surf_num; i++) {
+		ivisurf = surfaces[i];
+
+		if ((i > 0) && (i < hmi_ctrl->screen_num)) {
+			layer = wl_container_of(layer->link.prev, layer, link);
+			ivi_layout_interface->layer_set_render_order(layer->ivilayer, &ivisurf, 1);
+		}
+
 		ivi_layout_interface->surface_set_transition(ivisurf,
 					IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
 					duration);
@@ -383,6 +399,8 @@  mode_fullscreen_someone(struct hmi_controller *hmi_ctrl,
 							     surface_width,
 							     surface_height);
 	}
+
+	free(surfaces);
 }
 
 static void