aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-15 20:19:27 -0500
committerTed Gould <ted@gould.cx>2010-03-15 20:19:27 -0500
commitc90b0b458471bf826dbe0402d13bfc9f95793ed7 (patch)
tree82361dbb45848bf9cec4968d842cd994bbf7c8f5 /src
parent39e00ebbbf5a23620a3e8b7a46d759913cc7fcd2 (diff)
downloadayatana-indicator-session-c90b0b458471bf826dbe0402d13bfc9f95793ed7.tar.gz
ayatana-indicator-session-c90b0b458471bf826dbe0402d13bfc9f95793ed7.tar.bz2
ayatana-indicator-session-c90b0b458471bf826dbe0402d13bfc9f95793ed7.zip
Lock the screen in the various activate functions.
Diffstat (limited to 'src')
-rw-r--r--src/session-service.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/session-service.c b/src/session-service.c
index fa90da2..aff963d 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -342,6 +342,9 @@ static void
activate_guest_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data)
{
GError * error = NULL;
+
+ lock_screen(mi, timestamp, user_data);
+
if (!g_spawn_command_line_async(GUEST_SESSION_LAUNCHER, &error)) {
g_warning("Unable to start guest session: %s", error->message);
g_error_free(error);
@@ -382,6 +385,9 @@ static void
activate_new_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data)
{
GError * error = NULL;
+
+ lock_screen(mi, timestamp, user_data);
+
if (!g_spawn_command_line_async("gdmflexiserver --startnew", &error)) {
g_warning("Unable to start new session: %s", error->message);
g_error_free(error);
@@ -397,6 +403,8 @@ activate_user_session (DbusmenuMenuitem *mi, guint timestamp, gpointer user_data
UserData *user = (UserData *)user_data;
UsersServiceDbus *service = user->service;
+ lock_screen(mi, timestamp, user_data);
+
users_service_dbus_activate_user_session (service, user);
}