aboutsummaryrefslogtreecommitdiff
path: root/rootston/output.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-02-23 11:30:55 +0100
committerGuido Günther <agx@sigxcpu.org>2018-02-25 16:53:36 +0100
commite2ea1ebe48db25f7372bbab21bc66cde5934895b (patch)
tree0b0289ecb7c9cf7967c1d6476e0e519984e55629 /rootston/output.c
parentd08792bfffc6b7b28f59d7ee100091805367b7fa (diff)
rootston: Add alpha channel to views
Diffstat (limited to 'rootston/output.c')
-rw-r--r--rootston/output.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rootston/output.c b/rootston/output.c
index 3fc8ea84..8d968a98 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -202,6 +202,7 @@ struct render_data {
struct roots_output *output;
struct timespec *when;
pixman_region32_t *damage;
+ float alpha;
};
/**
@@ -296,7 +297,7 @@ static void render_surface(struct wlr_surface *surface, double lx, double ly,
pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
for (int i = 0; i < nrects; ++i) {
scissor_output(output, &rects[i]);
- wlr_render_with_matrix(renderer, surface->texture, &matrix, 1.0f);
+ wlr_render_with_matrix(renderer, surface->texture, &matrix, data->alpha);
}
damage_finish:
@@ -376,6 +377,7 @@ static void render_view(struct roots_view *view, struct render_data *data) {
return;
}
+ data->alpha = view->alpha;
render_decorations(view, data);
view_for_each_surface(view, render_surface, data);
}