Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: ash/wm/workspace/workspace_manager2.cc

Issue 11085053: Improving window auto management between workspaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed as requested. Corner cases will have to be addressed as they show Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/wm/workspace/workspace_manager2.cc
diff --git a/ash/wm/workspace/workspace_manager2.cc b/ash/wm/workspace/workspace_manager2.cc
index 148ca71485c3f19caf020f2681b22bc3c4e8a4e7..fe59eca06e95bfec4f6eae99130b776ba27707af 100644
--- a/ash/wm/workspace/workspace_manager2.cc
+++ b/ash/wm/workspace/workspace_manager2.cc
@@ -17,6 +17,7 @@
#include "ash/wm/window_animations.h"
#include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h"
+#include "ash/wm/workspace/auto_window_management.h"
#include "ash/wm/workspace/desktop_background_fade_controller.h"
#include "ash/wm/workspace/workspace_animations.h"
#include "ash/wm/workspace/workspace_layout_manager2.h"
@@ -597,10 +598,13 @@ void WorkspaceManager2::OnWindowAddedToWorkspace(Workspace2* workspace,
// to the workspace.
if (workspace == active_workspace_)
UpdateShelfVisibility();
+
+ RearrangeVisibleWindowOnShow(child);
sky 2012/10/16 17:25:34 Don't you only want to do any of the calls to auto
Mr4D (OOO till 08-26) 2012/10/16 19:00:28 That is handled by the RearrangeVisible... functio
}
void WorkspaceManager2::OnWillRemoveWindowFromWorkspace(Workspace2* workspace,
Window* child) {
+ RearrangeVisibleWindowOnHide(child);
child->ClearProperty(kWorkspaceKey);
}
@@ -613,6 +617,12 @@ void WorkspaceManager2::OnWindowRemovedFromWorkspace(Workspace2* workspace,
void WorkspaceManager2::OnWorkspaceChildWindowVisibilityChanged(
Workspace2* workspace,
Window* child) {
+
sky 2012/10/16 17:25:34 Move this to 630ish.
Mr4D (OOO till 08-26) 2012/10/16 19:00:28 No, we want to do that BEFORE we move the window b
sky 2012/10/16 22:01:14 This doesn't move the window between workspaces, b
Mr4D (OOO till 08-26) 2012/10/17 18:43:56 Done. The auto management code takes all associat
+ if (child->IsVisible())
sky 2012/10/16 22:01:14 Are you sure you don't want TargetVisibilty here?
Mr4D (OOO till 08-26) 2012/10/17 18:43:56 Okay - I guess we should probably do something abo
+ RearrangeVisibleWindowOnShow(child);
+ else
+ RearrangeVisibleWindowOnHide(child);
+
if (workspace->ShouldMoveToPending())
MoveWorkspaceToPendingOrDelete(workspace, NULL, SWITCH_VISIBILITY_CHANGED);
else if (workspace == active_workspace_)

Powered by Google App Engine
This is Rietveld 408576698