mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
launcher: Explicitly look up object path for seat
If mutter is running as a systemd user service, then we cannot use the magic "self" session for the ID lookup. For now we need to lookup the ID explicitly. Eventually we can change to use the magic "auto" paths for both the session and seat, but that will require systemd v243. See also https://github.com/systemd/systemd/pull/12424#issuecomment-487962314 https://gitlab.gnome.org/GNOME/mutter/merge_requests/571
This commit is contained in:
parent
fecc57ddf0
commit
52945f383d
@ -251,13 +251,15 @@ get_session_proxy (GCancellable *cancellable,
|
||||
}
|
||||
|
||||
static Login1Seat *
|
||||
get_seat_proxy (GCancellable *cancellable,
|
||||
get_seat_proxy (gchar *seat_id,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
g_autofree char *seat_proxy_path = get_escaped_dbus_path ("/org/freedesktop/login1/seat", seat_id);
|
||||
Login1Seat *seat = login1_seat_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
||||
"org.freedesktop.login1",
|
||||
"/org/freedesktop/login1/seat/self",
|
||||
seat_proxy_path,
|
||||
cancellable, error);
|
||||
if (!seat)
|
||||
g_prefix_error(error, "Could not get seat proxy: ");
|
||||
@ -511,7 +513,7 @@ meta_launcher_new (GError **error)
|
||||
if (!seat_id)
|
||||
goto fail;
|
||||
|
||||
seat_proxy = get_seat_proxy (NULL, error);
|
||||
seat_proxy = get_seat_proxy (seat_id, NULL, error);
|
||||
if (!seat_proxy)
|
||||
goto fail;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user