New issue
Advanced search Search tips

Issue 826377 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

mash: Handle window focus on first login (MruWindowTracker access in ChromeShellDelegate)

Project Member Reported by jamescook@chromium.org, Mar 27 2018

Issue description

//chrome/browser/ui/ash/chrome_shell_delegate.cc

void InitAfterFirstSessionStart() {
  // Restore focus after the user session is started.  It's needed because some
  // windows can be opened in background while login UI is still active because
  // we currently restore browser windows before login UI is deleted.
  aura::Window::Windows mru_list =
      ash::Shell::Get()->mru_window_tracker()->BuildMruWindowList();
  if (!mru_list.empty())
    mru_list.front()->Focus();

  // Enable magnifier scroll keys as there may be no mouse cursor in kiosk mode.
  ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode());

  // Enable long press action to toggle spoken feedback with hotrod
  // remote which can't handle shortcut.
  ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode());
}

Maybe a kiosk mode thing. Maybe it can use BrowserList instead of mru window list.

 

Comment 1 by xiy...@chromium.org, Mar 27 2018

Using MRU to restore focus is introduced in
  https://chromiumcodereview.appspot.com/22887021

It is pretty old. We can try to remove the code and see what happens. Ash might already able to activate a proper window after the login display is gone. If not, we can add some code in LoginDisplayHost to activate topmost window when it is gone.

Labels: -Proj-Mustash-Mash

Sign in to add a comment