launcher: Fix a few formatting issues
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>
This commit is contained in:
parent
1651ac8f2c
commit
5d8d3df101
@ -134,8 +134,10 @@ static gboolean
|
|||||||
find_systemd_session (char **session_id,
|
find_systemd_session (char **session_id,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const char * const graphical_session_types[] = { "wayland", "x11", "mir", NULL };
|
const char * const graphical_session_types[] =
|
||||||
const char * const active_states[] = { "active", "online", NULL };
|
{ "wayland", "x11", "mir", NULL };
|
||||||
|
const char * const active_states[] =
|
||||||
|
{ "active", "online", NULL };
|
||||||
g_autofree char *class = NULL;
|
g_autofree char *class = NULL;
|
||||||
g_autofree char *local_session_id = NULL;
|
g_autofree char *local_session_id = NULL;
|
||||||
g_autofree char *type = NULL;
|
g_autofree char *type = NULL;
|
||||||
@ -340,7 +342,8 @@ get_session_proxy (const char *fallback_session_id,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proxy_path = get_escaped_dbus_path ("/org/freedesktop/login1/session", session_id);
|
proxy_path =
|
||||||
|
get_escaped_dbus_path ("/org/freedesktop/login1/session", session_id);
|
||||||
|
|
||||||
flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START;
|
flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START;
|
||||||
session_proxy =
|
session_proxy =
|
||||||
@ -348,7 +351,8 @@ get_session_proxy (const char *fallback_session_id,
|
|||||||
flags,
|
flags,
|
||||||
"org.freedesktop.login1",
|
"org.freedesktop.login1",
|
||||||
proxy_path,
|
proxy_path,
|
||||||
cancellable, error);
|
cancellable,
|
||||||
|
error);
|
||||||
if (!session_proxy)
|
if (!session_proxy)
|
||||||
g_prefix_error(error, "Could not get session proxy: ");
|
g_prefix_error(error, "Could not get session proxy: ");
|
||||||
|
|
||||||
@ -360,7 +364,8 @@ get_seat_proxy (char *seat_id,
|
|||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
g_autofree char *seat_proxy_path = get_escaped_dbus_path ("/org/freedesktop/login1/seat", seat_id);
|
g_autofree char *seat_proxy_path =
|
||||||
|
get_escaped_dbus_path ("/org/freedesktop/login1/seat", seat_id);
|
||||||
GDBusProxyFlags flags;
|
GDBusProxyFlags flags;
|
||||||
MetaDBusLogin1Seat *seat;
|
MetaDBusLogin1Seat *seat;
|
||||||
|
|
||||||
@ -370,9 +375,10 @@ get_seat_proxy (char *seat_id,
|
|||||||
flags,
|
flags,
|
||||||
"org.freedesktop.login1",
|
"org.freedesktop.login1",
|
||||||
seat_proxy_path,
|
seat_proxy_path,
|
||||||
cancellable, error);
|
cancellable,
|
||||||
|
error);
|
||||||
if (!seat)
|
if (!seat)
|
||||||
g_prefix_error(error, "Could not get seat proxy: ");
|
g_prefix_error (error, "Could not get seat proxy: ");
|
||||||
|
|
||||||
return seat;
|
return seat;
|
||||||
}
|
}
|
||||||
@ -512,8 +518,10 @@ meta_launcher_activate_vt (MetaLauncher *launcher,
|
|||||||
{
|
{
|
||||||
g_assert (launcher->seat_proxy);
|
g_assert (launcher->seat_proxy);
|
||||||
|
|
||||||
return meta_dbus_login1_seat_call_switch_to_sync (launcher->seat_proxy, vt,
|
return meta_dbus_login1_seat_call_switch_to_sync (launcher->seat_proxy,
|
||||||
NULL, error);
|
vt,
|
||||||
|
NULL,
|
||||||
|
error);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user