exposay: set an alpha on fullscreen surfaces
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Tue, 7 Jan 2014 15:41:40 +0000 (16:41 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 8 Jan 2014 05:46:36 +0000 (21:46 -0800)
This makes the desktop background actually draw when there is
a fullscreen surface and we go to exposay.

desktop-shell/exposay.c
desktop-shell/shell.c
desktop-shell/shell.h

index f409aa3..01bf0b1 100644 (file)
@@ -286,6 +286,8 @@ exposay_layout(struct desktop_shell *shell)
                if (shell->exposay.focus_current == esurface->view)
                        highlight = esurface;
 
+               set_alpha_if_fullscreen(get_shell_surface(view->surface));
+
                exposay_animate_in(esurface);
 
                i++;
index f85a269..4cc23d5 100644 (file)
@@ -222,6 +222,13 @@ struct shell_seat {
        } popup_grab;
 };
 
+void
+set_alpha_if_fullscreen(struct shell_surface *shsurf)
+{
+       if (shsurf && shsurf->state.fullscreen)
+               shsurf->fullscreen.black_view->alpha = 0.25;
+}
+
 static struct desktop_shell *
 shell_surface_get_shell(struct shell_surface *shsurf);
 
index 7a8194d..8ef550f 100644 (file)
@@ -188,6 +188,9 @@ struct desktop_shell {
        char *client;
 };
 
+void
+set_alpha_if_fullscreen(struct shell_surface *shsurf);
+
 struct weston_output *
 get_default_output(struct weston_compositor *compositor);