diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-11-06 23:07:35 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2012-11-06 23:07:35 +0000 |
commit | eb5f04be525d30a5c3d0b8b9ba8a6e26326e044a (patch) | |
tree | 04c1fd69ac3bd2490eb6dea6d238ac2782a80165 | |
parent | ccc363f909fc8e2ecc571e83e18c12f46b771c1c (diff) | |
parent | ff2a773ff8d1f902e823f6d51b4775d448e0e9ae (diff) | |
download | ayatana-indicator-session-eb5f04be525d30a5c3d0b8b9ba8a6e26326e044a.tar.gz ayatana-indicator-session-eb5f04be525d30a5c3d0b8b9ba8a6e26326e044a.tar.bz2 ayatana-indicator-session-eb5f04be525d30a5c3d0b8b9ba8a6e26326e044a.zip |
Don't lock the session when clicking on the current user. Fixes: https://bugs.launchpad.net/bugs/1024392.
Approved by Charles Kerr, PS Jenkins bot.
-rw-r--r-- | src/session-menu-mgr.c | 10 |
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 |