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

Unified Diff: ash/root_window_controller.cc

Issue 149493008: Use active window if on current workspace for fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update fullscreen state tracking in workspace and only consider switchable containers for active no… Created 6 years, 10 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/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index a3ec7395f4fbf95b5b91d5360229a98443359f3d..6608e3172ea2e7bb8685d877edeb2dfae095445a 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -31,6 +31,7 @@
#include "ash/touch/touch_observer_hud.h"
#include "ash/wm/always_on_top_controller.h"
#include "ash/wm/dock/docked_window_layout_manager.h"
+#include "ash/wm/mru_window_tracker.h"
#include "ash/wm/panels/panel_layout_manager.h"
#include "ash/wm/panels/panel_window_event_handler.h"
#include "ash/wm/root_window_layout_manager.h"
@@ -569,18 +570,14 @@ void RootWindowController::UpdateShelfVisibility() {
}
const aura::Window* RootWindowController::GetWindowForFullscreenMode() const {
- const aura::Window::Windows& windows =
- GetContainer(kShellWindowId_DefaultContainer)->children();
const aura::Window* topmost_window = NULL;
- for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin();
- iter != windows.rend(); ++iter) {
- if (((*iter)->type() == ui::wm::WINDOW_TYPE_NORMAL ||
- (*iter)->type() == ui::wm::WINDOW_TYPE_PANEL) &&
- (*iter)->layer()->GetTargetVisibility()) {
- topmost_window = *iter;
- break;
- }
+ if (Shell::GetInstance()->mru_window_tracker()) {
+ topmost_window = Shell::GetInstance()->mru_window_tracker()->
+ GetMruWindowInRoot(root_window());
}
+
+ // If any transient parent of the active window is fullscreen the root
+ // window should remain in fullscreen mode.
while (topmost_window) {
if (wm::GetWindowState(topmost_window)->IsFullscreen())
return topmost_window;

Powered by Google App Engine
This is Rietveld 408576698