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

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

Issue 2248263003: Updates PointerEventRouter to handle switching move type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again 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
« 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 f7e0fdaa52d35bc8ad7d4c32e5007543e2e1b1c2..8b067b303a023c30e4fd89b1bc74de95bcfd0896 100644
--- a/services/ui/ws/window_tree.cc
+++ b/services/ui/ws/window_tree.cc
@@ -733,7 +733,7 @@ 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), pointer_watcher_id_,
+ client()->OnPointerEventObserved(ui::Event::Clone(event),
client_window_id.id);
}
@@ -1039,12 +1039,11 @@ void WindowTree::DispatchInputEventImpl(ServerWindow* target,
bool matched_pointer_watcher = EventMatchesPointerWatcher(event);
client()->OnWindowInputEvent(
event_ack_id_, ClientWindowIdForWindow(target).id,
- ui::Event::Clone(event),
- matched_pointer_watcher ? pointer_watcher_id_ : 0);
+ ui::Event::Clone(event), matched_pointer_watcher);
}
bool WindowTree::EventMatchesPointerWatcher(const ui::Event& event) const {
- if (pointer_watcher_id_ == 0)
+ if (!has_pointer_watcher_)
return false;
if (!event.IsPointerEvent())
return false;
@@ -1203,20 +1202,14 @@ void WindowTree::ReleaseCapture(uint32_t change_id, Id window_id) {
ReleaseCapture(ClientWindowId(window_id)));
}
-void WindowTree::StartPointerWatcher(bool want_moves,
- uint32_t pointer_watcher_id) {
- if (pointer_watcher_id == 0) {
- DVLOG(1) << "StartPointerWatcher called with 0.";
- StopPointerWatcher();
- return;
- }
+void WindowTree::StartPointerWatcher(bool want_moves) {
+ has_pointer_watcher_ = true;
pointer_watcher_want_moves_ = want_moves;
- pointer_watcher_id_ = pointer_watcher_id;
}
void WindowTree::StopPointerWatcher() {
+ has_pointer_watcher_ = false;
pointer_watcher_want_moves_ = false;
- pointer_watcher_id_ = 0;
}
void WindowTree::SetWindowBounds(uint32_t change_id,
« 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