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

Unified Diff: ash/wm/system_modal_container_layout_manager.cc

Issue 2151973002: ash: Include transient descendants as part of the active modal window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix missing events for control in transient descendants Created 4 years, 5 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
« no previous file with comments | « no previous file | ash/wm/system_modal_container_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/system_modal_container_layout_manager.cc
diff --git a/ash/wm/system_modal_container_layout_manager.cc b/ash/wm/system_modal_container_layout_manager.cc
index 1312edaab934c2ff95c103cb8afa1dbff74120bb..1928fd1c89c3dbfd46bce9f7f8efc65e42717aee 100644
--- a/ash/wm/system_modal_container_layout_manager.cc
+++ b/ash/wm/system_modal_container_layout_manager.cc
@@ -19,6 +19,7 @@
#include "ui/aura/window_property.h"
#include "ui/compositor/layer.h"
#include "ui/keyboard/keyboard_controller.h"
+#include "ui/wm/core/window_util.h"
namespace ash {
namespace {
@@ -140,7 +141,10 @@ void SystemModalContainerLayoutManager::OnKeyboardBoundsChanging(
bool SystemModalContainerLayoutManager::IsPartOfActiveModalWindow(
aura::Window* window) {
- return modal_window() && modal_window()->Contains(window);
+ return modal_window() &&
+ (modal_window()->Contains(window) ||
+ ::wm::HasTransientAncestor(::wm::GetToplevelWindow(window),
+ modal_window()));
}
bool SystemModalContainerLayoutManager::ActivateNextModalWindow() {
« no previous file with comments | « no previous file | ash/wm/system_modal_container_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698