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

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

Issue 2118383002: mus: Disregard windows that explicitly set can_accept_events to be false when sending events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Early return 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
Index: services/ui/ws/window_finder.cc
diff --git a/services/ui/ws/window_finder.cc b/services/ui/ws/window_finder.cc
index 09be99308ce1fe50dcfc4282af6331da7f931549..d013086f21501650a27115cdc4e968a0b43891e0 100644
--- a/services/ui/ws/window_finder.cc
+++ b/services/ui/ws/window_finder.cc
@@ -26,11 +26,17 @@ bool IsValidWindowForEvents(ServerWindow* window) {
ServerWindow* FindDeepestVisibleWindowForEvents(ServerWindow* window,
gfx::Point* location) {
+ if (!window->can_accept_events())
+ return nullptr;
+
const ServerWindow::Windows& children = window->children();
for (ServerWindow* child : base::Reversed(children)) {
if (!child->visible())
continue;
+ if (!child->can_accept_events())
msw 2016/07/12 22:07:23 optional nit: combine with if statement above.
riajiang 2016/07/13 00:01:46 Done.
+ continue;
+
// TODO(sky): support transform.
gfx::Point child_location(location->x() - child->bounds().x(),
location->y() - child->bounds().y());

Powered by Google App Engine
This is Rietveld 408576698