[gnome-flashback] common: fix root background image with scale != 1



commit 72d83ec5f3ca6d4d2701cd5eea430ae9c22c92b1
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Dec 1 15:12:17 2019 +0200

    common: fix root background image with scale != 1

 gnome-flashback/libcommon/gf-background-utils.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gnome-flashback/libcommon/gf-background-utils.c b/gnome-flashback/libcommon/gf-background-utils.c
index 8a3a6ed..bf2aaff 100644
--- a/gnome-flashback/libcommon/gf-background-utils.c
+++ b/gnome-flashback/libcommon/gf-background-utils.c
@@ -200,6 +200,8 @@ get_persistent_pixmap (cairo_surface_t *surface)
   Pixmap persistent_pixmap;
   Visual *xvisual;
   cairo_surface_t *pixmap_surface;
+  double x_scale;
+  double y_scale;
   cairo_t *cr;
 
   xdisplay = XOpenDisplay (NULL);
@@ -230,6 +232,9 @@ get_persistent_pixmap (cairo_surface_t *surface)
                                               width,
                                               height);
 
+  cairo_surface_get_device_scale (surface, &x_scale, &y_scale);
+  cairo_surface_set_device_scale (pixmap_surface, x_scale, y_scale);
+
   cr = cairo_create (pixmap_surface);
   cairo_set_source_surface (cr, surface, 0, 0);
   cairo_paint (cr);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]