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

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

Issue 2685883003: chromeos: converts observed pointer events to DIPs (Closed)
Patch Set: merge Created 3 years, 10 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/window_tree.h ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_tree.cc
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
index 53224669f80d28dedf688fec7b56e0b581f1be56..ce6c4a6ea32c1c4c890e4aca53bc3315951d4468 100644
--- a/services/ui/ws/window_tree.cc
+++ b/services/ui/ws/window_tree.cc
@@ -798,7 +798,8 @@ void WindowTree::ProcessWindowSurfaceChanged(
}
void WindowTree::SendToPointerWatcher(const ui::Event& event,
- ServerWindow* target_window) {
+ ServerWindow* target_window,
+ int64_t display_id) {
if (!EventMatchesPointerWatcher(event))
return;
@@ -806,8 +807,8 @@ void WindowTree::SendToPointerWatcher(const ui::Event& event,
// Ignore the return value from IsWindowKnown() as in the case of the client
// not knowing the window we'll send 0, which corresponds to no window.
IsWindowKnown(target_window, &client_window_id);
- client()->OnPointerEventObserved(ui::Event::Clone(event),
- client_window_id.id);
+ client()->OnPointerEventObserved(ui::Event::Clone(event), client_window_id.id,
+ display_id);
}
bool WindowTree::ShouldRouteToWindowManager(const ServerWindow* window) const {
@@ -1146,8 +1147,10 @@ void WindowTree::DispatchInputEventImpl(ServerWindow* target,
// Should only get events from windows attached to a host.
DCHECK(event_source_wms_);
bool matched_pointer_watcher = EventMatchesPointerWatcher(event);
+ Display* display = GetDisplay(target);
+ DCHECK(display);
client()->OnWindowInputEvent(
- event_ack_id_, ClientWindowIdForWindow(target).id,
+ event_ack_id_, ClientWindowIdForWindow(target).id, display->GetId(),
ui::Event::Clone(event), matched_pointer_watcher);
}
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698