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

Unified Diff: ui/aura_shell/stacking_controller.cc

Issue 9027020: Bypass ToplevelWindowEventFilter for panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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: ui/aura_shell/stacking_controller.cc
diff --git a/ui/aura_shell/stacking_controller.cc b/ui/aura_shell/stacking_controller.cc
index 35505449ec0aca09286c9a2a87d99b52161d5b7a..b306aa1cc536983a31873c8c721531e628121967 100644
--- a/ui/aura_shell/stacking_controller.cc
+++ b/ui/aura_shell/stacking_controller.cc
@@ -23,6 +23,10 @@ bool IsWindowModal(aura::Window* window) {
return window->transient_parent() && window->GetIntProperty(aura::kModalKey);
}
+bool IsWindowPanel(aura::Window* window) {
+ return window->GetIntProperty(aura::kPanelKey);
+}
+
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -48,7 +52,10 @@ aura::Window* StackingController::GetDefaultParent(aura::Window* window) {
case aura::WINDOW_TYPE_POPUP:
if (IsWindowModal(window))
return GetModalContainer(window);
- return always_on_top_controller_->GetContainer(window);
+ else if (IsWindowPanel(window))
Ben Goodger (Google) 2011/12/22 23:22:45 nit: no else after return, here and below:
prasadt 2011/12/23 01:51:40 Done.
+ return GetContainer(internal::kShellWindowId_PanelContainer);
+ else
+ return always_on_top_controller_->GetContainer(window);
case aura::WINDOW_TYPE_MENU:
case aura::WINDOW_TYPE_TOOLTIP:
return GetContainer(internal::kShellWindowId_MenusAndTooltipsContainer);

Powered by Google App Engine
This is Rietveld 408576698