diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-08-20 20:49:17 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-08-20 20:49:17 +0000 |
commit | fd60f87fa9bb8b45ee38040888f4956562b2fabf (patch) | |
tree | 9373764cbca0f90161b23e3e3d594a2d394c44d6 /src | |
parent | b1a261f5a2c6c21190591f7d98d6604f5988369b (diff) | |
parent | ea03828d1b847a1cac7b509aceb81caf5bf87a90 (diff) | |
download | ayatana-indicator-session-fd60f87fa9bb8b45ee38040888f4956562b2fabf.tar.gz ayatana-indicator-session-fd60f87fa9bb8b45ee38040888f4956562b2fabf.tar.bz2 ayatana-indicator-session-fd60f87fa9bb8b45ee38040888f4956562b2fabf.zip |
Lock the current session before switching to the guest session.
This is done by modifying IndicatorSessionActionsDbus::switch_to_guest() to call org.gnome.ScreenSaver's Lock function before switching to the guest session. Fixes: https://bugs.launchpad.net/bugs/1205273.
Approved by PS Jenkins bot, Ted Gould.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend-dbus/actions.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/backend-dbus/actions.c b/src/backend-dbus/actions.c index 9030ca7..fcf850d 100644 --- a/src/backend-dbus/actions.c +++ b/src/backend-dbus/actions.c @@ -169,7 +169,7 @@ set_dm_seat (IndicatorSessionActionsDbus * self, DisplayManagerSeat * seat) if (p->dm_seat != NULL) { g_cancellable_cancel (p->dm_seat_cancellable); - g_clear_object (&p->dm_seat); + g_clear_object (&p->dm_seat_cancellable); g_clear_object (&p->dm_seat); } @@ -734,7 +734,7 @@ my_about (IndicatorSessionActions * self G_GNUC_UNUSED) ***/ static void -my_switch_to_screensaver (IndicatorSessionActions * self) +lock_current_session (IndicatorSessionActions * self) { priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv; @@ -744,6 +744,12 @@ my_switch_to_screensaver (IndicatorSessionActions * self) } static void +my_switch_to_screensaver (IndicatorSessionActions * self) +{ + lock_current_session (self); +} + +static void my_switch_to_greeter (IndicatorSessionActions * self) { priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv; @@ -762,6 +768,8 @@ my_switch_to_guest (IndicatorSessionActions * self) g_return_if_fail (p->dm_seat != NULL); + lock_current_session (self); + display_manager_seat_call_switch_to_guest (p->dm_seat, "", p->dm_seat_cancellable, NULL, NULL); |