| Index: ash/wm/base_layout_manager.cc
|
| diff --git a/ash/wm/base_layout_manager.cc b/ash/wm/base_layout_manager.cc
|
| index 89e99d9371250ef74893efc901e5b55046f18a97..6d87b2686df4b3d84c6458268a1612792f77cdd3 100644
|
| --- a/ash/wm/base_layout_manager.cc
|
| +++ b/ash/wm/base_layout_manager.cc
|
| @@ -4,13 +4,16 @@
|
|
|
| #include "ash/wm/base_layout_manager.h"
|
|
|
| +#include "ash/ash_switches.h"
|
| #include "ash/screen_ash.h"
|
| #include "ash/shelf/shelf_layout_manager.h"
|
| #include "ash/shell.h"
|
| #include "ash/wm/window_animations.h"
|
| #include "ash/wm/window_properties.h"
|
| #include "ash/wm/window_util.h"
|
| +#include "ash/wm/workspace/stuck_edge_types.h"
|
| #include "ash/wm/workspace/workspace_window_resizer.h"
|
| +#include "base/command_line.h"
|
| #include "ui/aura/client/activation_client.h"
|
| #include "ui/aura/client/aura_constants.h"
|
| #include "ui/aura/root_window.h"
|
| @@ -190,6 +193,7 @@ void BaseLayoutManager::ShowStateChanged(aura::Window* window,
|
| }
|
|
|
| void BaseLayoutManager::UpdateBoundsFromShowState(aura::Window* window) {
|
| + int stuck_edges_mask = GetStuckToEdge(window);
|
| switch (window->GetProperty(aura::client::kShowStateKey)) {
|
| case ui::SHOW_STATE_DEFAULT:
|
| case ui::SHOW_STATE_NORMAL: {
|
| @@ -200,6 +204,9 @@ void BaseLayoutManager::UpdateBoundsFromShowState(aura::Window* window) {
|
| SetChildBoundsDirect(window,
|
| BoundsWithScreenEdgeVisible(window,
|
| bounds_in_parent));
|
| +
|
| + // getting unstuck
|
| + stuck_edges_mask = STUCK_EDGE_NONE;
|
| }
|
| ClearRestoreBounds(window);
|
| break;
|
| @@ -208,6 +215,7 @@ void BaseLayoutManager::UpdateBoundsFromShowState(aura::Window* window) {
|
| case ui::SHOW_STATE_MAXIMIZED:
|
| SetChildBoundsDirect(window,
|
| ScreenAsh::GetMaximizedWindowBoundsInParent(window));
|
| + stuck_edges_mask = STUCK_EDGE_NONE;
|
| break;
|
|
|
| case ui::SHOW_STATE_FULLSCREEN:
|
| @@ -215,11 +223,16 @@ void BaseLayoutManager::UpdateBoundsFromShowState(aura::Window* window) {
|
| // TODO(jamescook): Use animation here. Be sure the lock screen works.
|
| SetChildBoundsDirect(
|
| window, ScreenAsh::GetDisplayBoundsInParent(window));
|
| + stuck_edges_mask = STUCK_EDGE_NONE;
|
| break;
|
|
|
| default:
|
| break;
|
| }
|
| + if (GetStuckToEdge(window) != stuck_edges_mask &&
|
| + CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kAshEnableDockedWindows))
|
| + SetStuckToEdge(window, stuck_edges_mask);
|
| }
|
|
|
| void BaseLayoutManager::AdjustWindowSizesForScreenChange() {
|
|
|