| Index: ui/events/ozone/evdev/touch_event_converter_evdev.cc
|
| diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.cc b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
|
| index bbdf660395eb164ba9d3bff5edfb7a6cc4797cb2..7b666e0e4c43e6ba5db49842a76eff0094c762f2 100644
|
| --- a/ui/events/ozone/evdev/touch_event_converter_evdev.cc
|
| +++ b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
|
| @@ -75,9 +75,10 @@ namespace ui {
|
| TouchEventConverterEvdev::TouchEventConverterEvdev(
|
| int fd,
|
| base::FilePath path,
|
| + int id,
|
| const EventDeviceInfo& info,
|
| const EventDispatchCallback& callback)
|
| - : EventConverterEvdev(fd, path),
|
| + : EventConverterEvdev(fd, path, id),
|
| callback_(callback),
|
| syn_dropped_(false),
|
| is_type_a_(false),
|
| @@ -91,22 +92,19 @@ TouchEventConverterEvdev::~TouchEventConverterEvdev() {
|
| }
|
|
|
| void TouchEventConverterEvdev::Init(const EventDeviceInfo& info) {
|
| - gfx::Screen *screen = gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE);
|
| + gfx::Screen* screen = gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE);
|
| if (!screen)
|
| return; // No scaling.
|
| gfx::Display display = screen->GetPrimaryDisplay();
|
| gfx::Size size = display.GetSizeInPixel();
|
|
|
| - pressure_min_ = info.GetAbsMinimum(ABS_MT_PRESSURE),
|
| - pressure_max_ = info.GetAbsMaximum(ABS_MT_PRESSURE),
|
| - x_min_tuxels_ = info.GetAbsMinimum(ABS_MT_POSITION_X),
|
| - x_num_tuxels_ = info.GetAbsMaximum(ABS_MT_POSITION_X) - x_min_tuxels_ + 1,
|
| - y_min_tuxels_ = info.GetAbsMinimum(ABS_MT_POSITION_Y),
|
| - y_num_tuxels_ = info.GetAbsMaximum(ABS_MT_POSITION_Y) - y_min_tuxels_ + 1,
|
| - x_min_pixels_ = x_min_tuxels_,
|
| - x_num_pixels_ = x_num_tuxels_,
|
| - y_min_pixels_ = y_min_tuxels_,
|
| - y_num_pixels_ = y_num_tuxels_,
|
| + pressure_min_ = info.GetAbsMinimum(ABS_MT_PRESSURE);
|
| + pressure_max_ = info.GetAbsMaximum(ABS_MT_PRESSURE);
|
| + x_min_tuxels_ = info.GetAbsMinimum(ABS_MT_POSITION_X);
|
| + x_num_tuxels_ = info.GetAbsMaximum(ABS_MT_POSITION_X) - x_min_tuxels_ + 1;
|
| + y_min_tuxels_ = info.GetAbsMinimum(ABS_MT_POSITION_Y);
|
| + y_num_tuxels_ = info.GetAbsMaximum(ABS_MT_POSITION_Y) - y_min_tuxels_ + 1;
|
| + native_size_ = gfx::Size(x_num_tuxels_, y_num_tuxels_);
|
|
|
| // Map coordinates onto screen.
|
| x_min_pixels_ = 0;
|
| @@ -142,6 +140,14 @@ bool TouchEventConverterEvdev::Reinitialize() {
|
| return false;
|
| }
|
|
|
| +bool TouchEventConverterEvdev::HasTouchscreen() const {
|
| + return true;
|
| +}
|
| +
|
| +gfx::Size TouchEventConverterEvdev::GetTouchscreenSize() const {
|
| + return native_size_;
|
| +}
|
| +
|
| void TouchEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) {
|
| input_event inputs[MAX_FINGERS * 6 + 1];
|
| ssize_t read_size = read(fd, inputs, sizeof(inputs));
|
|
|