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

Unified Diff: motion_event_coalescer.cc

Issue 6902072: wm: Update a lot of code to use structs from geometry.h. (Closed) Base URL: ssh://gitrw.chromium.org:9222/window_manager.git@master
Patch Set: move override-redirect stacking and visibility into Window Created 9 years, 8 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
Index: motion_event_coalescer.cc
diff --git a/motion_event_coalescer.cc b/motion_event_coalescer.cc
index 0e5268ad37cc85453429fd4f805f0a83b9008bce..779c1c0ef05cd2dd86f093a8c2a1f44043e2f9e8 100644
--- a/motion_event_coalescer.cc
+++ b/motion_event_coalescer.cc
@@ -16,8 +16,7 @@ MotionEventCoalescer::MotionEventCoalescer(EventLoop* event_loop,
timeout_id_(-1),
timeout_ms_(timeout_ms),
have_queued_position_(false),
- x_(-1),
- y_(-1),
+ position_(-1, -1),
cb_(cb),
synchronous_(false) {
CHECK(cb);
@@ -41,8 +40,7 @@ void MotionEventCoalescer::Start() {
0, timeout_ms_);
}
have_queued_position_ = false;
- x_ = -1;
- y_ = -1;
+ position_.reset(-1, -1);
}
void MotionEventCoalescer::Stop() {
@@ -50,11 +48,10 @@ void MotionEventCoalescer::Stop() {
StopInternal(true);
}
-void MotionEventCoalescer::StorePosition(int x, int y) {
- if (x == x_ && y == y_)
+void MotionEventCoalescer::StorePosition(const Point& pos) {
+ if (pos == position_)
return;
- x_ = x;
- y_ = y;
+ position_ = pos;
have_queued_position_ = true;
if (synchronous_)
HandleTimeout();
« no previous file with comments | « motion_event_coalescer.h ('k') | motion_event_coalescer_test.cc » ('j') | window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698