Fix support for non-lxsession environnement when compiled with --enable-dbus
authorJulien Lavergne <julien.lavergne@gmail.com>
Mon, 21 Oct 2013 20:38:46 +0000 (22:38 +0200)
committerJulien Lavergne <julien.lavergne@gmail.com>
Mon, 21 Oct 2013 20:38:46 +0000 (22:38 +0200)
src/lxappearance.c

index 8edd893..050845a 100644 (file)
@@ -68,13 +68,9 @@ static gboolean check_lxde_dbus()
         return FALSE;
     }
 
-    DBusMessage * test = dbus_message_new_method_call  (
-        "org.lxde.SessionManager",
-        "/org/lxde/SessionManager",
-        "org.lxde.SessionManager",
-        "Logout");
+    dbus_bool_t ret = dbus_bus_name_has_owner(connection,"org.lxde.SessionManager",NULL);
 
-    if (dbus_message_has_interface(test, "org.lxde.SessionManager"))
+    if (ret == TRUE)
     {
         return TRUE;
     }