| Index: ash/wm/workspace_controller.cc
|
| diff --git a/ash/wm/workspace_controller.cc b/ash/wm/workspace_controller.cc
|
| index c880663ac8c3c7de9b4c9084f953f65a5a55f842..c86cadcf6ceb2ab5db13c89e748175cb2e2822d4 100644
|
| --- a/ash/wm/workspace_controller.cc
|
| +++ b/ash/wm/workspace_controller.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "ash/wm/workspace_controller.h"
|
|
|
| +#include "ash/shell.h"
|
| #include "ash/wm/window_util.h"
|
| #include "ash/wm/workspace/workspace_manager.h"
|
| #include "ui/aura/client/activation_client.h"
|
| @@ -58,5 +59,19 @@ void WorkspaceController::OnWindowActivated(aura::Window* gained_active,
|
| }
|
| }
|
|
|
| +void WorkspaceController::OnAttemptToReactivateWindow(
|
| + aura::Window* request_active,
|
| + aura::Window* actual_active) {
|
| + if (ash::Shell::GetInstance()->IsSystemModalWindowOpen()) {
|
| + // While a system model dialog is showing requests to activate a window
|
| + // other than that of the modal dialog fail. Outside of this function we
|
| + // only switch the active workspace when activation changes. That prevents
|
| + // the active workspace from changing while a system modal dialog is
|
| + // showing. This code ensures the active workspace changes even though
|
| + // activation doesn't change away from the system model dialog.
|
| + workspace_manager_->SetActiveWorkspaceByWindow(request_active);
|
| + }
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace ash
|
|
|