[PATCH 3/3] shell: set black surface alpha properly in switcher_next()
zhiwen.wu at linux.intel.com
zhiwen.wu at linux.intel.com
Sun Apr 1 05:13:09 PDT 2012
From: Alex Wu <zhiwen.wu at linux.intel.com>
Make the black surfaces semitransparent when switching surface, and
if associated fullscreen surface is chosen, make black surface opaque.
---
src/shell.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/shell.c b/src/shell.c
index a4cf0b4..feb388f 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1950,6 +1950,12 @@ switcher_next(struct switcher *switcher)
default:
break;
}
+
+ if (is_black_surface(surface, NULL)) {
+ surface->alpha = 64;
+ surface->geometry.dirty = 1;
+ weston_surface_damage(surface);
+ }
}
if (next == NULL)
@@ -1964,6 +1970,9 @@ switcher_next(struct switcher *switcher)
switcher->current = next;
next->alpha = 255;
+
+ if (get_shell_surface_type(switcher->current) == SHELL_SURFACE_FULLSCREEN)
+ get_shell_surface(switcher->current)->fullscreen.black_surface->alpha = 255;
}
static void
--
1.7.5.4
More information about the wayland-devel
mailing list