[gtk+/wip/window-scales] Fix build with old cairo



commit 47fb9d8862259b93e490bea0d50dc4130dc8d41e
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jun 26 20:02:44 2013 -0400

    Fix build with old cairo
    
    One call to cairo_surface_get_device_scale was not protected
    by an ifdef.

 gdk/x11/gdkwindow-x11.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index a1c6be9..4141d33 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -2854,7 +2854,10 @@ gdk_window_x11_set_background (GdkWindow      *window,
           double x, y, sx, sy;
 
           cairo_surface_get_device_offset (surface, &x, &y);
+          sx = sy = 1.;
+#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
           cairo_surface_get_device_scale (surface, &sx, &sy);
+#endif
           /* XXX: This still bombs for non-pixmaps, but there's no way to
            * detect we're not a pixmap in Cairo... */
           if (x == 0.0 && y == 0.0 &&


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