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

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

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows Created 4 years, 3 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/server_window_surface_manager.cc ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « services/ui/ws/server_window_surface_manager.cc ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698