aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
Diffstat (limited to 'rootston')
-rw-r--r--rootston/desktop.c4
-rw-r--r--rootston/output.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c
index 57e2d54b..9d5cd2fa 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -25,6 +25,10 @@
struct roots_view *view_create() {
struct roots_view *view = calloc(1, sizeof(struct roots_view));
+ if (!view) {
+ return NULL;
+ }
+ view->alpha = 1.0f;
return view;
}
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);
}