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

Side by Side Diff: ui/events/ozone/evdev/touch_event_converter_evdev.cc

Issue 514303002: Revert "ozone: evdev: Use tracking id for TouchEvent finger id" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/ozone/evdev/touch_event_converter_evdev.h" 5 #include "ui/events/ozone/evdev/touch_event_converter_evdev.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <linux/input.h> 9 #include <linux/input.h>
10 #include <poll.h> 10 #include <poll.h>
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 } 286 }
287 287
288 void TouchEventConverterEvdev::ReportEvents(base::TimeDelta delta) { 288 void TouchEventConverterEvdev::ReportEvents(base::TimeDelta delta) {
289 for (int i = 0; i < MAX_FINGERS; i++) { 289 for (int i = 0; i < MAX_FINGERS; i++) {
290 if (altered_slots_[i]) { 290 if (altered_slots_[i]) {
291 // TODO(rikroege): Support elliptical finger regions. 291 // TODO(rikroege): Support elliptical finger regions.
292 TouchEvent evt(events_[i].type_, 292 TouchEvent evt(events_[i].type_,
293 gfx::PointF(events_[i].x_, events_[i].y_), 293 gfx::PointF(events_[i].x_, events_[i].y_),
294 /* flags */ 0, 294 /* flags */ 0,
295 /* touch_id */ events_[i].finger_, 295 /* touch_id */ i,
296 delta, 296 delta,
297 /* radius_x */ events_[i].radius_x_, 297 /* radius_x */ events_[i].radius_x_,
298 /* radius_y */ events_[i].radius_y_, 298 /* radius_y */ events_[i].radius_y_,
299 /* angle */ 0., 299 /* angle */ 0.,
300 events_[i].pressure_); 300 events_[i].pressure_);
301 DispatchEventToCallback(&evt); 301 DispatchEventToCallback(&evt);
302 302
303 // Subsequent events for this finger will be touch-move until it 303 // Subsequent events for this finger will be touch-move until it
304 // is released. 304 // is released.
305 events_[i].type_ = ET_TOUCH_MOVED; 305 events_[i].type_ = ET_TOUCH_MOVED;
306 } 306 }
307 } 307 }
308 altered_slots_.reset(); 308 altered_slots_.reset();
309 } 309 }
310 310
311 } // namespace ui 311 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698