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

Unified Diff: services/ui/ws/modal_window_controller.cc

Issue 2737003002: Fix event targeting for sub-windows of system modal windows in mus+ash. (Closed)
Patch Set: Add a test. Created 3 years, 9 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: services/ui/ws/modal_window_controller.cc
diff --git a/services/ui/ws/modal_window_controller.cc b/services/ui/ws/modal_window_controller.cc
index bb1c0bf135a439d22aecf86635158699c44e69a7..1a49731950d9ff38c331d187f168b035321ec840 100644
--- a/services/ui/ws/modal_window_controller.cc
+++ b/services/ui/ws/modal_window_controller.cc
@@ -78,7 +78,7 @@ bool ModalWindowController::IsWindowBlockedBy(
bool ModalWindowController::IsWindowBlocked(const ServerWindow* window) const {
DCHECK(window);
- return GetActiveSystemModalWindow() || GetModalChildForWindowAncestor(window);
+ return GetTargetForWindow(window) != window;
}
const ServerWindow* ModalWindowController::GetTargetForWindow(
@@ -87,7 +87,8 @@ const ServerWindow* ModalWindowController::GetTargetForWindow(
// children of their transient parent.
ServerWindow* system_modal_window = GetActiveSystemModalWindow();
if (system_modal_window)
- return system_modal_window;
+ return system_modal_window->Contains(window) ? window : system_modal_window;
+
return window ? GetWindowModalTargetForWindow(window) : nullptr;
}
« services/ui/ws/event_dispatcher_unittest.cc ('K') | « services/ui/ws/event_dispatcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698