Chromium Code Reviews| Index: ash/common/wm/maximize_mode/maximize_mode_controller.cc |
| diff --git a/ash/common/wm/maximize_mode/maximize_mode_controller.cc b/ash/common/wm/maximize_mode/maximize_mode_controller.cc |
| index ef07902244ecc33649b4b503a17bb766184afe73..13c7b1f2a4c70f2574c4ebc0e9aaa45ac4705702 100644 |
| --- a/ash/common/wm/maximize_mode/maximize_mode_controller.cc |
| +++ b/ash/common/wm/maximize_mode/maximize_mode_controller.cc |
| @@ -226,6 +226,9 @@ void MaximizeModeController::TabletModeEventReceived( |
| bool on, |
| const base::TimeTicks& time) { |
| tablet_mode_switch_is_on_ = on; |
| + // Do not change if docked. |
| + if (!display::Display::HasInternalDisplay()) |
| + return; |
| if (on && !IsMaximizeModeWindowManagerEnabled()) |
| EnterMaximizeMode(); |
| } |
| @@ -359,6 +362,10 @@ void MaximizeModeController::OnDisplayConfigurationChanged() { |
| !WmShell::Get()->IsActiveDisplayId( |
| display::Display::InternalDisplayId())) { |
| LeaveMaximizeMode(); |
| + } else if (tablet_mode_switch_is_on_) { |
|
gwendal
2017/01/23 20:48:31
not enough: what if the use is in tent mode, and t
jonross
2017/01/23 21:08:30
With the internal display back on we will automati
|
| + // The internal display has returned, as we are exiting docked mode. |
| + // The device is still in tablet mode, so trigger maximize mode. |
| + EnterMaximizeMode(); |
| } |
| } |