diff --git a/src/login1.c b/src/login1.c index 7fe84119..fa453c7c 100644 --- a/src/login1.c +++ b/src/login1.c @@ -14,6 +14,7 @@ #include #include "login1.h" +#include "seat.h" #define LOGIN1_SERVICE_NAME "org.freedesktop.login1" #define LOGIN1_OBJECT_NAME "/org/freedesktop/login1" @@ -248,6 +249,20 @@ signal_cb (GDBusConnection *connection, g_signal_emit (service, service_signals[SEAT_REMOVED], 0, seat); } } + else if (strcmp (signal_name, "SecureAttentionKey") == 0) + { + Login1SeatPrivate *s_priv; + const gchar *id, *path; + g_variant_get (parameters, "(&s&o)", &id, &path); + + g_autoptr(Login1Seat) seat = login1_service_get_seat (service, id); + s_priv = login1_seat_get_instance_private (seat); + if (seat) + { + seat_switch_to_greeter (s_priv->id); + } + + } } gboolean