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

Unified Diff: services/ui/public/cpp/window_tree_client.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/public/cpp/window_tree_client.h ('k') | services/ui/public/interfaces/window_tree.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/window_tree_client.cc
diff --git a/services/ui/public/cpp/window_tree_client.cc b/services/ui/public/cpp/window_tree_client.cc
index b37d6bc846350de1af9ee0f288cc42a04fb49bbc..96d2cd032ab48c34c96a049e01ae61188c524bf2 100644
--- a/services/ui/public/cpp/window_tree_client.cc
+++ b/services/ui/public/cpp/window_tree_client.cc
@@ -632,10 +632,7 @@ void WindowTreeClient::StartPointerWatcher(bool want_moves) {
if (has_pointer_watcher_)
StopPointerWatcher();
has_pointer_watcher_ = true;
- pointer_watcher_id_++;
- if (pointer_watcher_id_ == 0)
- pointer_watcher_id_++;
- tree_->StartPointerWatcher(want_moves, pointer_watcher_id_);
+ tree_->StartPointerWatcher(want_moves);
}
void WindowTreeClient::StopPointerWatcher() {
@@ -981,14 +978,11 @@ void WindowTreeClient::OnWindowSharedPropertyChanged(
void WindowTreeClient::OnWindowInputEvent(uint32_t event_id,
Id window_id,
std::unique_ptr<ui::Event> event,
- uint32_t pointer_watcher_id) {
+ bool matches_pointer_watcher) {
DCHECK(event);
Window* window = GetWindowByServerId(window_id); // May be null.
- // Non-zero pointer_watcher_id means it matched a pointer watcher on the
- // server.
- if (pointer_watcher_id_ != 0 && has_pointer_watcher_ &&
- pointer_watcher_id == pointer_watcher_id_) {
+ if (matches_pointer_watcher && has_pointer_watcher_) {
DCHECK(event->IsPointerEvent());
delegate_->OnPointerEventObserved(*event->AsPointerEvent(), window);
}
@@ -1023,11 +1017,10 @@ void WindowTreeClient::OnWindowInputEvent(uint32_t event_id,
}
void WindowTreeClient::OnPointerEventObserved(std::unique_ptr<ui::Event> event,
- uint32_t pointer_watcher_id,
uint32_t window_id) {
DCHECK(event);
DCHECK(event->IsPointerEvent());
- if (has_pointer_watcher_ && pointer_watcher_id == pointer_watcher_id_) {
+ if (has_pointer_watcher_) {
Window* target_window = GetWindowByServerId(window_id);
delegate_->OnPointerEventObserved(*event->AsPointerEvent(), target_window);
}
« no previous file with comments | « services/ui/public/cpp/window_tree_client.h ('k') | services/ui/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698