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, |