[PATCH weston] ivi-shell: Damage view below after unmapping
Ucan, Emre (ADITG/SW1)
eucan at de.adit-jv.com
Tue Jan 17 12:30:56 UTC 2017
If ivilayer or ivisurf of ivi_view is made invisible in the
commit_changes call, we have to damage the weston_view below this
ivi_view. Otherwise content of this ivi_view will stay visible.
Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
---
ivi-shell/ivi-layout.c | 41 ++++++++++++++++++++++++-----------------
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 60d05c4..cc01de3 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -666,28 +666,35 @@ commit_changes(struct ivi_layout *layout)
{
struct ivi_layout_screen *iviscrn = NULL;
struct ivi_layout_layer *ivilayer = NULL;
+ struct ivi_layout_surface *ivisurf = NULL;
struct ivi_layout_view *ivi_view = NULL;
- wl_list_for_each(iviscrn, &layout->screen_list, link) {
- wl_list_for_each(ivilayer, &iviscrn->order.layer_list, order.link) {
- /*
- * If ivilayer is invisible, weston_view of ivisurf doesn't
- * need to be modified.
- */
- if (ivilayer->prop.visibility == false)
- continue;
+ wl_list_for_each(ivi_view, &layout->view_list, link) {
+ ivilayer = ivi_view->on_layer;
+ ivisurf = ivi_view->ivisurf;
+ iviscrn = ivilayer->on_screen;
- wl_list_for_each(ivi_view, &ivilayer->order.view_list, order_link) {
- /*
- * If ivilayer is invisible, weston_view of ivisurf doesn't
- * need to be modified.
- */
- if (ivi_view->ivisurf->prop.visibility == false)
- continue;
+ /*
+ * If ivi_view is not visible on a screen, weston_view of ivi_view
+ * doesn't need to be modified.
+ */
+ if (!wl_list_length(&ivi_view->order_link) || !iviscrn)
+ continue;
- update_prop(iviscrn, ivilayer, ivi_view);
- }
+ /*
+ * If ivilayer or ivisurf of ivi_view is made invisible in this
+ * commit_changes call, we have to damage the weston_view below this
+ * ivi_view. Otherwise content of this ivi_view will stay visible.
+ */
+ if ((!ivilayer->prop.visibility &&
+ (ivilayer->prop.event_mask & IVI_NOTIFICATION_VISIBILITY)) ||
+ (!ivisurf->prop.visibility &&
+ (ivisurf->prop.event_mask & IVI_NOTIFICATION_VISIBILITY))) {
+ weston_view_damage_below(ivi_view->view);
+ continue;
}
+
+ update_prop(iviscrn, ivilayer, ivi_view);
}
}
--
1.7.9.5
More information about the wayland-devel
mailing list