diff options
author | 2018-07-04 11:34:01 +0100 | |
---|---|---|
committer | 2018-07-04 11:34:01 +0100 | |
commit | f414885b1d1f09b92619dcedc4ec2d20b257a9aa (patch) | |
tree | 76afc471ef8228a2cc09dcee5871e8235eae112e /swaylock/render.c | |
parent | Merge pull request #2203 from martinetd/ipc-server-display-destroy (diff) | |
parent | Merge branch 'master' into fix_transparency (diff) | |
download | sway-f414885b1d1f09b92619dcedc4ec2d20b257a9aa.tar.gz sway-f414885b1d1f09b92619dcedc4ec2d20b257a9aa.tar.zst sway-f414885b1d1f09b92619dcedc4ec2d20b257a9aa.zip |
Merge pull request #2200 from mucamaca/fix_transparency
Fix #1857 -> transparency in swaylock
Diffstat (limited to 'swaylock/render.c')
-rw-r--r-- | swaylock/render.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/swaylock/render.c b/swaylock/render.c index 2032ddcf..ea23d0d8 100644 --- a/swaylock/render.c +++ b/swaylock/render.c | |||
@@ -30,6 +30,8 @@ void render_frame(struct swaylock_surface *surface) { | |||
30 | cairo_t *cairo = surface->current_buffer->cairo; | 30 | cairo_t *cairo = surface->current_buffer->cairo; |
31 | cairo_identity_matrix(cairo); | 31 | cairo_identity_matrix(cairo); |
32 | 32 | ||
33 | cairo_save(cairo); | ||
34 | cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE); | ||
33 | if (state->args.mode == BACKGROUND_MODE_SOLID_COLOR || !surface->image) { | 35 | if (state->args.mode == BACKGROUND_MODE_SOLID_COLOR || !surface->image) { |
34 | cairo_set_source_u32(cairo, state->args.color); | 36 | cairo_set_source_u32(cairo, state->args.color); |
35 | cairo_paint(cairo); | 37 | cairo_paint(cairo); |
@@ -37,6 +39,7 @@ void render_frame(struct swaylock_surface *surface) { | |||
37 | render_background_image(cairo, surface->image, | 39 | render_background_image(cairo, surface->image, |
38 | state->args.mode, buffer_width, buffer_height); | 40 | state->args.mode, buffer_width, buffer_height); |
39 | } | 41 | } |
42 | cairo_restore(cairo); | ||
40 | cairo_identity_matrix(cairo); | 43 | cairo_identity_matrix(cairo); |
41 | 44 | ||
42 | int arc_radius = ARC_RADIUS * surface->scale; | 45 | int arc_radius = ARC_RADIUS * surface->scale; |