| Index: ash/wm/lock_window_state.cc
|
| diff --git a/ash/wm/lock_window_state.cc b/ash/wm/lock_window_state.cc
|
| index 06fb8b3f143ecdf5a198e0a1b8a879b82bef4ceb..d153fb258c8803fd8be6039fe468ceb483e77206 100644
|
| --- a/ash/wm/lock_window_state.cc
|
| +++ b/ash/wm/lock_window_state.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "ash/wm/lock_window_state.h"
|
|
|
| +#include "ash/display/display_manager.h"
|
| #include "ash/screen_util.h"
|
| #include "ash/shell.h"
|
| #include "ash/wm/lock_layout_manager.h"
|
| @@ -164,6 +165,17 @@ wm::WindowStateType LockWindowState::GetMaximizedOrCenteredWindowType(
|
| wm::WINDOW_STATE_TYPE_NORMAL;
|
| }
|
|
|
| +gfx::Rect GetBoundsForLockWindow(aura::Window* window) {
|
| + DisplayManager* display_manager = Shell::GetInstance()->display_manager();
|
| + if (display_manager->IsInUnifiedMode()) {
|
| + const gfx::Display& first =
|
| + display_manager->software_mirroring_display_list()[0];
|
| + return first.bounds();
|
| + } else {
|
| + return ScreenUtil::GetDisplayBoundsInParent(window);
|
| + }
|
| +}
|
| +
|
| void LockWindowState::UpdateBounds(wm::WindowState* window_state) {
|
| if (!window_state->IsMaximized() && !window_state->IsFullscreen())
|
| return;
|
| @@ -177,9 +189,9 @@ void LockWindowState::UpdateBounds(wm::WindowState* window_state) {
|
| keyboard_controller->keyboard_visible()) {
|
| keyboard_bounds = keyboard_controller->current_keyboard_bounds();
|
| }
|
| -
|
| gfx::Rect bounds =
|
| - ScreenUtil::GetDisplayBoundsInParent(window_state->window());
|
| + ScreenUtil::GetShelfDisplayBoundsInScreen(window_state->window());
|
| +
|
| bounds.set_height(bounds.height() - keyboard_bounds.height());
|
|
|
| VLOG(1) << "Updating window bounds to: " << bounds.ToString();
|
|
|