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

Unified Diff: ui/aura_shell/stacking_controller.cc

Issue 8574033: Beginnings of Window Modality support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
« no previous file with comments | « ui/aura_shell/shell_window_ids.h ('k') | ui/aura_shell/status_area_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/stacking_controller.cc
===================================================================
--- ui/aura_shell/stacking_controller.cc (revision 110305)
+++ ui/aura_shell/stacking_controller.cc (working copy)
@@ -4,6 +4,7 @@
#include "ui/aura_shell/stacking_controller.h"
+#include "ui/aura/client/aura_constants.h"
#include "ui/aura/desktop.h"
#include "ui/aura/window.h"
#include "ui/aura_shell/always_on_top_controller.h"
@@ -21,9 +22,14 @@
// Returns true if children of |window| can be activated.
bool SupportsChildActivation(aura::Window* window) {
return window->id() == kShellWindowId_DefaultContainer ||
- window->id() == kShellWindowId_AlwaysOnTopContainer;
+ window->id() == kShellWindowId_AlwaysOnTopContainer ||
+ window->id() == kShellWindowId_ModalContainer;
}
+bool IsWindowModal(aura::Window* window) {
+ return window->transient_parent() && window->GetIntProperty(aura::kModalKey);
+}
+
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -68,6 +74,10 @@
switch (window->type()) {
case aura::WINDOW_TYPE_NORMAL:
case aura::WINDOW_TYPE_POPUP:
+ if (IsWindowModal(window)) {
+ parent = GetContainer(internal::kShellWindowId_ModalContainer);
+ break;
+ }
parent = always_on_top_controller_->GetContainer(window);
break;
case aura::WINDOW_TYPE_MENU:
« no previous file with comments | « ui/aura_shell/shell_window_ids.h ('k') | ui/aura_shell/status_area_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698