summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2015-12-26 23:52:51 +0900
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-02-03 14:29:03 +0200
commit90c2789e8d83a5b090cf4b91a6770a93f08028a0 (patch)
tree2ede9b3064aab8fec19d419a12ef6f3920310d00
parent0cc4e986695decb384cbbb8ce0e5cd08d2905249 (diff)
downloadweston-90c2789e8d83a5b090cf4b91a6770a93f08028a0.tar.gz
weston-90c2789e8d83a5b090cf4b91a6770a93f08028a0.tar.bz2
weston-90c2789e8d83a5b090cf4b91a6770a93f08028a0.zip
ivi-layout: apply opacity to weston_view correctly
update_opacity is only called when a ivi-surface is visible. But the previous code also checks event masks redundantly. However if the event happens when ivi-surface is invisible, opacity is not calculated. This patch removes this redundant check to fix potential bug. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r--ivi-shell/ivi-layout.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 4ad7a5f5..f7c4f273 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -322,12 +322,9 @@ update_opacity(struct ivi_layout_layer *ivilayer,
double layer_alpha = wl_fixed_to_double(ivilayer->prop.opacity);
double surf_alpha = wl_fixed_to_double(ivisurf->prop.opacity);
- if ((ivilayer->event_mask & IVI_NOTIFICATION_OPACITY) ||
- (ivisurf->event_mask & IVI_NOTIFICATION_OPACITY)) {
- tmpview = get_weston_view(ivisurf);
- assert(tmpview != NULL);
- tmpview->alpha = layer_alpha * surf_alpha;
- }
+ tmpview = get_weston_view(ivisurf);
+ assert(tmpview != NULL);
+ tmpview->alpha = layer_alpha * surf_alpha;
}
static void