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

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

Issue 2277563002: Wires up immersive mode for chrome and mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix crash Created 4 years, 4 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 0b46df6a0acbc3763aa4e0ba04e091e96f62993a..cc3739c444c59da3a0a1c1757319229459f20408 100644
--- a/services/ui/ws/window_finder.cc
+++ b/services/ui/ws/window_finder.cc
@@ -20,8 +20,12 @@ namespace ws {
bool IsValidWindowForEvents(ServerWindow* window) {
ServerWindowSurfaceManager* surface_manager = window->surface_manager();
+ // Valid windows have at least one of the two surface types. Only an underlay
+ // is valid as we assume the window manager will likely get the event in this
+ // case.
return surface_manager &&
- surface_manager->HasSurfaceOfType(mojom::SurfaceType::DEFAULT);
+ (surface_manager->HasSurfaceOfType(mojom::SurfaceType::DEFAULT) ||
+ surface_manager->HasSurfaceOfType(mojom::SurfaceType::UNDERLAY));
}
ServerWindow* FindDeepestVisibleWindowForEvents(ServerWindow* window,

Powered by Google App Engine
This is Rietveld 408576698