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

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: Addressed feedback. 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
« no previous file with comments | « services/ui/ws/event_dispatcher_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9ac70b9b6afe1ff24b0b721f5111f21be3da49b1 100644
--- a/services/ui/ws/modal_window_controller.cc
+++ b/services/ui/ws/modal_window_controller.cc
@@ -78,16 +78,16 @@ bool ModalWindowController::IsWindowBlockedBy(
bool ModalWindowController::IsWindowBlocked(const ServerWindow* window) const {
DCHECK(window);
- return GetActiveSystemModalWindow() || GetModalChildForWindowAncestor(window);
+ return GetTargetForWindow(window) != window;
}
const ServerWindow* ModalWindowController::GetTargetForWindow(
const ServerWindow* window) const {
- // TODO(moshayedi): crbug.com/697127. Handle windows which are modal to
- // children of their transient parent.
+ // TODO(moshayedi): crbug.com/697127. Handle MODAL_TYPE_CHILD.
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;
}
« no previous file with comments | « 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