[mutter] Revert "launcher: simplify getting session dbus proxy"
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Revert "launcher: simplify getting session dbus proxy"
- Date: Thu, 17 Sep 2015 04:18:20 +0000 (UTC)
commit b7aca078447031ac85550216a3836b6d5e81576a
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Sep 17 11:40:59 2015 +0800
Revert "launcher: simplify getting session dbus proxy"
Signals are sent to a specific ID, so we can't use "self" here. After
this revert, VT switching works again.
This reverts commit 8e22bf5bc96a7d9ff1aba8ea8217a4c3ca06b4ce.
https://bugzilla.gnome.org/show_bug.cgi?id=753434
src/backends/native/meta-launcher.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/backends/native/meta-launcher.c b/src/backends/native/meta-launcher.c
index 6fc4505..618bd68 100644
--- a/src/backends/native/meta-launcher.c
+++ b/src/backends/native/meta-launcher.c
@@ -71,17 +71,26 @@ report_error_and_die (const char *prefix,
static Login1Session *
get_session_proxy (GCancellable *cancellable)
{
+ char *proxy_path;
+ char *session_id;
Login1Session *session_proxy;
GError *error = NULL;
+ 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",
- "/org/freedesktop/login1/session/self",
+ proxy_path,
cancellable, &error);
if (!session_proxy)
report_error_and_die ("Failed getting session proxy", error);
+ free (proxy_path);
+
return session_proxy;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]