OLD | NEW |
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/tablet_event_converter_evdev.h" | 5 #include "ui/events/ozone/evdev/tablet_event_converter_evdev.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <linux/input.h> | 8 #include <linux/input.h> |
9 | 9 |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 DeviceEventDispatcherEvdev* dispatcher) | 24 DeviceEventDispatcherEvdev* dispatcher) |
25 : EventConverterEvdev(fd, | 25 : EventConverterEvdev(fd, |
26 path, | 26 path, |
27 id, | 27 id, |
28 type, | 28 type, |
29 info.name(), | 29 info.name(), |
30 info.vendor_id(), | 30 info.vendor_id(), |
31 info.product_id()), | 31 info.product_id()), |
32 cursor_(cursor), | 32 cursor_(cursor), |
33 dispatcher_(dispatcher), | 33 dispatcher_(dispatcher), |
| 34 y_abs_location_(0), |
| 35 x_abs_location_(0), |
34 stylus_(0), | 36 stylus_(0), |
35 abs_value_dirty_(false) { | 37 abs_value_dirty_(false) { |
36 x_abs_min_ = info.GetAbsMinimum(ABS_X); | 38 x_abs_min_ = info.GetAbsMinimum(ABS_X); |
37 x_abs_range_ = info.GetAbsMaximum(ABS_X) - x_abs_min_ + 1; | 39 x_abs_range_ = info.GetAbsMaximum(ABS_X) - x_abs_min_ + 1; |
38 y_abs_min_ = info.GetAbsMinimum(ABS_Y); | 40 y_abs_min_ = info.GetAbsMinimum(ABS_Y); |
39 y_abs_range_ = info.GetAbsMaximum(ABS_Y) - y_abs_min_ + 1; | 41 y_abs_range_ = info.GetAbsMaximum(ABS_Y) - y_abs_min_ + 1; |
40 } | 42 } |
41 | 43 |
42 TabletEventConverterEvdev::~TabletEventConverterEvdev() { | 44 TabletEventConverterEvdev::~TabletEventConverterEvdev() { |
43 Stop(); | 45 Stop(); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 UpdateCursor(); | 178 UpdateCursor(); |
177 | 179 |
178 dispatcher_->DispatchMouseMoveEvent( | 180 dispatcher_->DispatchMouseMoveEvent( |
179 MouseMoveEventParams(input_device_.id, cursor_->GetLocation(), | 181 MouseMoveEventParams(input_device_.id, cursor_->GetLocation(), |
180 TimeDeltaFromInputEvent(input))); | 182 TimeDeltaFromInputEvent(input))); |
181 | 183 |
182 abs_value_dirty_ = false; | 184 abs_value_dirty_ = false; |
183 } | 185 } |
184 | 186 |
185 } // namespace ui | 187 } // namespace ui |
OLD | NEW |