[gnome-flashback] common: adapt to gnome-desktop API changes



commit b64400c4f31d2a09d235da93f5b4e54a8db9c142
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Jan 17 00:01:54 2020 +0200

    common: adapt to gnome-desktop API changes
    
    https://gitlab.gnome.org/GNOME/gnome-flashback/issues/34

 configure.ac                                    | 8 ++++++++
 gnome-flashback/libcommon/gf-background-utils.c | 7 +++++++
 2 files changed, 15 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 6ccbc78..54d8917 100644
--- a/configure.ac
+++ b/configure.ac
@@ -283,6 +283,14 @@ PKG_CHECK_EXISTS([pango >= 1.44.0],
                  AC_DEFINE([HAVE_PANGO144], [1],
                            [Define if Pango is 1.44.0 or newer]))
 
+dnl **************************************************************************
+dnl Check if we have gnome-desktop 3.35.4 or newer
+dnl **************************************************************************
+
+PKG_CHECK_EXISTS([gnome-desktop-3.0 >= 3.35.4],
+                 AC_DEFINE([HAVE_GNOME_DESKTOP_3_35_4], [1],
+                           [Define if gnome-desktop is 3.35.4 or newer]))
+
 dnl **************************************************************************
 dnl Systemd session
 dnl **************************************************************************
diff --git a/gnome-flashback/libcommon/gf-background-utils.c b/gnome-flashback/libcommon/gf-background-utils.c
index bf2aaff..38ce1ca 100644
--- a/gnome-flashback/libcommon/gf-background-utils.c
+++ b/gnome-flashback/libcommon/gf-background-utils.c
@@ -385,11 +385,18 @@ gf_background_surface_create (GdkDisplay *display,
       monitor = gdk_display_get_monitor (display, i);
       gdk_monitor_get_geometry (monitor, &geometry);
 
+#ifdef HAVE_GNOME_DESKTOP_3_35_4
+      monitor_surface = gnome_bg_create_surface (bg,
+                                                 window,
+                                                 geometry.width,
+                                                 geometry.height);
+#else
       monitor_surface = gnome_bg_create_surface (bg,
                                                  window,
                                                  geometry.width,
                                                  geometry.height,
                                                  FALSE);
+#endif
 
       cairo_set_source_surface (cr, monitor_surface, geometry.x, geometry.y);
       cairo_paint (cr);


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