aboutsummaryrefslogtreecommitdiff
path: root/swaybg
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-09-23 21:44:57 +0200
committerGitHub <noreply@github.com>2018-09-23 21:44:57 +0200
commit4a4f07ac25d18dfeffc6a1ff55e175ba01abc290 (patch)
treedcea2c0275a68f8eef6d94bfabcbec7c1f4ad46e /swaybg
parent0bc9dc192fb453fad5ce9dae519786a4989fb36a (diff)
parent9ea99a5d367c2f98bfd4c70cb00481c029c7b878 (diff)
Merge pull request #2699 from RedSoxFan/fix-2667
swaybg: fix increasingly smaller bg on hotplug
Diffstat (limited to 'swaybg')
-rw-r--r--swaybg/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/swaybg/main.c b/swaybg/main.c
index 5b0d0458..742669ef 100644
--- a/swaybg/main.c
+++ b/swaybg/main.c
@@ -73,6 +73,10 @@ static void render_frame(struct swaybg_state *state) {
return;
}
cairo_t *cairo = state->current_buffer->cairo;
+ cairo_save(cairo);
+ cairo_set_operator(cairo, CAIRO_OPERATOR_CLEAR);
+ cairo_paint(cairo);
+ cairo_restore(cairo);
if (state->args->mode == BACKGROUND_MODE_SOLID_COLOR) {
cairo_set_source_u32(cairo, state->context.color);
cairo_paint(cairo);