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.
This commit is contained in:
Alex Wu 2012-04-01 20:13:09 +08:00 committed by Kristian Høgsberg
parent 2185843ced
commit 1659daa21f
1 changed files with 9 additions and 0 deletions

View File

@ -1950,6 +1950,12 @@ switcher_next(struct switcher *switcher)
default: default:
break; break;
} }
if (is_black_surface(surface, NULL)) {
surface->alpha = 64;
surface->geometry.dirty = 1;
weston_surface_damage(surface);
}
} }
if (next == NULL) if (next == NULL)
@ -1964,6 +1970,9 @@ switcher_next(struct switcher *switcher)
switcher->current = next; switcher->current = next;
next->alpha = 255; 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 static void