aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2012-11-06 16:08:31 +0100
committerLars Uebernickel <lars.uebernickel@canonical.com>2012-11-06 16:08:31 +0100
commitff2a773ff8d1f902e823f6d51b4775d448e0e9ae (patch)
tree04c1fd69ac3bd2490eb6dea6d238ac2782a80165
parentccc363f909fc8e2ecc571e83e18c12f46b771c1c (diff)
downloadayatana-indicator-session-ff2a773ff8d1f902e823f6d51b4775d448e0e9ae.tar.gz
ayatana-indicator-session-ff2a773ff8d1f902e823f6d51b4775d448e0e9ae.tar.bz2
ayatana-indicator-session-ff2a773ff8d1f902e823f6d51b4775d448e0e9ae.zip
Don't lock the session when clicking on the current user
-rw-r--r--src/session-menu-mgr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c
index 697218f..427f274 100644
--- a/src/session-menu-mgr.c
+++ b/src/session-menu-mgr.c
@@ -775,6 +775,7 @@ user_menuitem_new (AccountsUser * user, SessionMenuMgr * mgr)
/* set the is-current-user property */
const gboolean is_current_user =
!g_strcmp0 (g_get_user_name(), accounts_user_get_user_name(user));
+
dbusmenu_menuitem_property_set_bool (mi,
USER_ITEM_PROP_IS_CURRENT_USER,
is_current_user);
@@ -1077,9 +1078,14 @@ static void
action_func_switch_to_user (AccountsUser * user)
{
SessionMenuMgr * mgr = user_get_mgr (user);
+
g_return_if_fail (mgr != NULL);
- action_func_lock (mgr);
- users_service_dbus_activate_user_session (mgr->users_dbus_facade, user);
+
+ if (g_strcmp0 (g_get_user_name(), accounts_user_get_user_name(user)) != 0)
+ {
+ action_func_lock (mgr);
+ users_service_dbus_activate_user_session (mgr->users_dbus_facade, user);
+ }
}
static void