diff options
author | emersion <contact@emersion.fr> | 2018-09-23 21:44:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-23 21:44:57 +0200 |
commit | 4a4f07ac25d18dfeffc6a1ff55e175ba01abc290 (patch) | |
tree | dcea2c0275a68f8eef6d94bfabcbec7c1f4ad46e /common/background-image.c | |
parent | 0bc9dc192fb453fad5ce9dae519786a4989fb36a (diff) | |
parent | 9ea99a5d367c2f98bfd4c70cb00481c029c7b878 (diff) |
Merge pull request #2699 from RedSoxFan/fix-2667
swaybg: fix increasingly smaller bg on hotplug
Diffstat (limited to 'common/background-image.c')
-rw-r--r-- | common/background-image.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/background-image.c b/common/background-image.c index f3d2551e..5ede55e3 100644 --- a/common/background-image.c +++ b/common/background-image.c @@ -58,6 +58,7 @@ void render_background_image(cairo_t *cairo, cairo_surface_t *image, double width = cairo_image_surface_get_width(image); double height = cairo_image_surface_get_height(image); + cairo_save(cairo); switch (mode) { case BACKGROUND_MODE_STRETCH: cairo_scale(cairo, @@ -116,4 +117,5 @@ void render_background_image(cairo_t *cairo, cairo_surface_t *image, break; } cairo_paint(cairo); + cairo_restore(cairo); } |