diff options
author | Alex Wu <zhiwen.wu@linux.intel.com> | 2012-04-01 20:13:09 +0800 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-02 22:17:04 -0400 |
commit | 1659daa21f5da3e7f10f3fa485390b29bc5ea2be (patch) | |
tree | e54c9c9df02766c1ade1444fb0c78e20cbb5a875 /src | |
parent | 2185843ced634a1fa398d252f322cc398038b2f9 (diff) |
shell: set black surface alpha properly in switcher_next()
Make the black surfaces semitransparent when switching surface, and
if associated fullscreen surface is chosen, make black surface opaque.
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shell.c b/src/shell.c index a4cf0b46..feb388f7 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 |