[Spice-commits] src/desktop-integration.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 11 14:18:55 UTC 2019


 src/desktop-integration.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit f4e5ed6a1386dbada7e0322a2ac19ca7d6a46a9e
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Jan 9 01:22:36 2019 +0400

    desktop: Do not try org.gnome.SessionManager on Windows or Mac
    
    DBus support is available on those systems, yet it doesn't make sense
    to attempt to connect to GNOME session manager.
    
    Mark gnome_integration_init() as unused. The following patch is
    compiling out the GNOME support instead. It is not squashed here,
    because it makes reviewing much harder.
    
    Fixes:
    https://gitlab.freedesktop.org/spice/spice-gtk/issues/81
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/src/desktop-integration.c b/src/desktop-integration.c
index 7c433bb..8a9d5ca 100644
--- a/src/desktop-integration.c
+++ b/src/desktop-integration.c
@@ -53,6 +53,7 @@ static void handle_dbus_call_error(const char *call, GError **_error)
     g_clear_error(_error);
 }
 
+G_GNUC_UNUSED
 static gboolean gnome_integration_init(SpiceDesktopIntegration *self)
 {
     G_GNUC_UNUSED SpiceDesktopIntegrationPrivate *priv = self->priv;
@@ -160,8 +161,13 @@ static void spice_desktop_integration_init(SpiceDesktopIntegration *self)
     priv = spice_desktop_integration_get_instance_private(self);
     self->priv = priv;
 
-    if (!gnome_integration_init(self))
-       g_warning("Warning no automount-inhibiting implementation available");
+#if defined(G_OS_UNIX) && !__APPLE__
+    if (gnome_integration_init(self)) {
+        return;
+    }
+#endif
+
+    g_warning("Warning no automount-inhibiting implementation available");
 }
 
 static void spice_desktop_integration_dispose(GObject *gobject)


More information about the Spice-commits mailing list