1 From e8bfcbd7e64a296d2aba63a80d8e181055587f76 Mon Sep 17 00:00:00 2001
2 From: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
3 Date: Mon, 30 Nov 2015 11:05:37 +0900
4 Subject: [PATCH] ivi-shell: multi screen support. ivi_layout_screen to be
5 taken account into property change in commitChanges.
7 Property change is now done in update_prop so to consider ivi_screen
8 property for caluculating transform of weston surface, ivi_layout_screen
9 is added as a parameter of update_prop.
11 However, update_prop of weston_view of a ivi_surface can not be done
12 even if it is set on a screen. The propoerty change shall be done only
13 when a visibility of ivi_surface or ivi_layer which contains the
14 ivi_surface is ON. Such a condition shall be checked at commit_changes
15 as well to avoid calling update_prop, which actually updates
18 Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
20 ivi-shell/ivi-layout.c | 23 +++++++++++++++++++----
21 1 file changed, 19 insertions(+), 4 deletions(-)
23 diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
24 index 31b5def..1773af8 100644
25 --- a/ivi-shell/ivi-layout.c
26 +++ b/ivi-shell/ivi-layout.c
27 @@ -737,16 +737,17 @@ calc_surface_to_global_matrix_and_mask_to_weston_surface(
31 -update_prop(struct ivi_layout_layer *ivilayer,
32 +update_prop(struct ivi_layout_screen *iviscrn,
33 + struct ivi_layout_layer *ivilayer,
34 struct ivi_layout_surface *ivisurf)
36 struct weston_view *tmpview;
37 struct ivi_rectangle r;
40 - if (!ivilayer->event_mask && !ivisurf->event_mask) {
41 + /*In case of no prop change, this just returns*/
42 + if (!ivilayer->event_mask && !ivisurf->event_mask)
46 update_opacity(ivilayer, ivisurf);
48 @@ -802,8 +803,22 @@ commit_changes(struct ivi_layout *layout)
50 wl_list_for_each(iviscrn, &layout->screen_list, link) {
51 wl_list_for_each(ivilayer, &iviscrn->order.layer_list, order.link) {
53 + * If ivilayer is invisible, weston_view of ivisurf doesn't
54 + * need to be modified.
56 + if (ivilayer->prop.visibility == false)
59 wl_list_for_each(ivisurf, &ivilayer->order.surface_list, order.link) {
60 - update_prop(ivilayer, ivisurf);
62 + * If ivilayer is invisible, weston_view of ivisurf doesn't
63 + * need to be modified.
65 + if (ivisurf->prop.visibility == false)
68 + update_prop(iviscrn, ivilayer, ivisurf);