[mutter] launcher: simplify getting session dbus proxy
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] launcher: simplify getting session dbus proxy
- Date: Mon, 7 Sep 2015 12:42:49 +0000 (UTC)
commit 8e22bf5bc96a7d9ff1aba8ea8217a4c3ca06b4ce
Author: Marek Chalupa <mchqwerty gmail com>
Date: Mon Sep 7 13:38:49 2015 +0200
launcher: simplify getting session dbus proxy
Use path "/org/freedesktop/login1/session/self" instead of
getting session id and building the path manually
https://bugzilla.gnome.org/show_bug.cgi?id=753434
src/backends/native/meta-launcher.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/src/backends/native/meta-launcher.c b/src/backends/native/meta-launcher.c
index 410b69b..988aef8 100644
--- a/src/backends/native/meta-launcher.c
+++ b/src/backends/native/meta-launcher.c
@@ -56,22 +56,12 @@ struct _MetaLauncher
static Login1Session *
get_session_proxy (GCancellable *cancellable)
{
- char *proxy_path;
- char *session_id;
Login1Session *session_proxy;
-
- if (sd_pid_get_session (getpid (), &session_id) < 0)
- return NULL;
-
- proxy_path = get_escaped_dbus_path ("/org/freedesktop/login1/session", session_id);
-
session_proxy = login1_session_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
"org.freedesktop.login1",
- proxy_path,
+ "/org/freedesktop/login1/session/self",
cancellable, NULL);
- free (proxy_path);
-
return session_proxy;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]