diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-09-23 15:17:36 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-09-23 15:17:36 -0400 |
commit | 9ea99a5d367c2f98bfd4c70cb00481c029c7b878 (patch) | |
tree | dcea2c0275a68f8eef6d94bfabcbec7c1f4ad46e /sway/commands/unmark.c | |
parent | 0bc9dc192fb453fad5ce9dae519786a4989fb36a (diff) |
swaybg: fix increasingly smaller bg on hotplug
render_background_image alters the scale that cairo uses. Depending on
the image mode, resolution, and image size, this may cause the surface
to be rendered increasingly smaller. By calling cairo_save and
cairo_restore, any changes to the cairo settings by the function are
not kept as a side effect.
The surface that swaybg uses is also now cleared before rendering a frame.
This is needed to avoid artifacts on resolution or scale changes with
certain combinations of image modes, resolutions, and image sizes. This
was also part of the increasingly smaller background visual since it
made it so it was not obvious the region being rendered to was smaller
and caused an increasing number of smaller images to be appear for each
hotplug.
Diffstat (limited to 'sway/commands/unmark.c')
0 files changed, 0 insertions, 0 deletions