Index: services/ui/ws/window_finder.cc |
diff --git a/services/ui/ws/window_finder.cc b/services/ui/ws/window_finder.cc |
index cc3739c444c59da3a0a1c1757319229459f20408..426000877c4bd6335f6a9c9d2e044857fda6c924 100644 |
--- a/services/ui/ws/window_finder.cc |
+++ b/services/ui/ws/window_finder.cc |
@@ -5,7 +5,6 @@ |
#include "services/ui/ws/window_finder.h" |
#include "base/containers/adapters.h" |
-#include "services/ui/surfaces/surfaces_state.h" |
#include "services/ui/ws/server_window.h" |
#include "services/ui/ws/server_window_delegate.h" |
#include "services/ui/ws/server_window_surface.h" |
@@ -19,13 +18,13 @@ namespace ui { |
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::UNDERLAY)); |
+ ServerWindowSurfaceManager* surface_manager = window->surface_manager(); |
+ return !window->IsContainer() && surface_manager && |
+ (surface_manager->HasSurfaceOfType(mojom::SurfaceType::DEFAULT) || |
+ surface_manager->HasSurfaceOfType(mojom::SurfaceType::UNDERLAY)); |
} |
ServerWindow* FindDeepestVisibleWindowForEvents(ServerWindow* window, |