summaryrefslogtreecommitdiffstats
path: root/ash/system/user
diff options
context:
space:
mode:
Diffstat (limited to 'ash/system/user')
-rw-r--r--ash/system/user/tray_user.cc7
-rw-r--r--ash/system/user/tray_user_separator.cc4
-rw-r--r--ash/system/user/user_view.cc7
3 files changed, 13 insertions, 5 deletions
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index cb86298..9851ba1 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -93,8 +93,11 @@ views::View* TrayUser::CreateDefaultView(user::LoginStatus status) {
const SessionStateDelegate* session_state_delegate =
Shell::GetInstance()->session_state_delegate();
- // If the screen is locked show only the currently active user.
- if (multiprofile_index_ && session_state_delegate->IsUserSessionBlocked())
+ // If the screen is locked or a system modal dialog box is shown, show only
+ // the currently active user.
+ if (multiprofile_index_ &&
+ (session_state_delegate->IsUserSessionBlocked() ||
+ Shell::GetInstance()->IsSystemModalWindowOpen()))
return NULL;
CHECK(user_ == NULL);
diff --git a/ash/system/user/tray_user_separator.cc b/ash/system/user/tray_user_separator.cc
index 7058d2f..d152a3b 100644
--- a/ash/system/user/tray_user_separator.cc
+++ b/ash/system/user/tray_user_separator.cc
@@ -26,8 +26,10 @@ views::View* TrayUserSeparator::CreateDefaultView(user::LoginStatus status) {
const SessionStateDelegate* session_state_delegate =
Shell::GetInstance()->session_state_delegate();
- // If the screen is locked, or only a single user is shown, show nothing.
+ // If the screen is locked, a system modal dialog or a single user is shown,
+ // show nothing.
if (session_state_delegate->IsUserSessionBlocked() ||
+ Shell::GetInstance()->IsSystemModalWindowOpen() ||
session_state_delegate->NumberOfLoggedInUsers() < 2)
return NULL;
diff --git a/ash/system/user/user_view.cc b/ash/system/user/user_view.cc
index 689764f..52f128d 100644
--- a/ash/system/user/user_view.cc
+++ b/ash/system/user/user_view.cc
@@ -400,8 +400,11 @@ void UserView::AddUserCard(user::LoginStatus login) {
max_card_width -= logout_button_->GetPreferredSize().width();
user_card_view_ =
new UserCardView(login, max_card_width, multiprofile_index_);
- bool clickable = IsMultiProfileSupportedAndUserActive() ||
- IsMultiAccountSupportedAndUserActive();
+ // The entry is clickable when no system modal dialog is open and one of the
+ // multi user options is active.
+ bool clickable = !Shell::GetInstance()->IsSystemModalWindowOpen() &&
+ (IsMultiProfileSupportedAndUserActive() ||
+ IsMultiAccountSupportedAndUserActive());
if (clickable) {
// To allow the border to start before the icon, reduce the size before and
// add an inset to the icon to get the spacing.