| Index: ui/events/ozone/evdev/input_device_factory_evdev.cc
|
| diff --git a/ui/events/ozone/evdev/input_device_factory_evdev.cc b/ui/events/ozone/evdev/input_device_factory_evdev.cc
|
| index 988047ba7097a004ea7d9977fc0ba8585028f743..02af807fa70d3c49014147968203e49a9705710b 100644
|
| --- a/ui/events/ozone/evdev/input_device_factory_evdev.cc
|
| +++ b/ui/events/ozone/evdev/input_device_factory_evdev.cc
|
| @@ -191,6 +191,7 @@ InputDeviceFactoryEvdev::InputDeviceFactoryEvdev(
|
| mouse_list_dirty_(false),
|
| touchpad_list_dirty_(false),
|
| caps_lock_led_enabled_(false),
|
| + next_touch_id_offset_(0),
|
| weak_ptr_factory_(this) {
|
| }
|
|
|
| @@ -245,6 +246,9 @@ void InputDeviceFactoryEvdev::AttachInputDevice(
|
| converters_[path]->Start();
|
| UpdateDirtyFlags(converters_[path]);
|
|
|
| + // Setup touch event id offsets.
|
| + ApplyTouchIdOffset(converters_[path]);
|
| +
|
| // Sync settings to new device.
|
| ApplyInputDeviceSettings();
|
| ApplyCapsLockLed();
|
| @@ -389,6 +393,14 @@ void InputDeviceFactoryEvdev::ApplyCapsLockLed() {
|
| }
|
| }
|
|
|
| +void InputDeviceFactoryEvdev::ApplyTouchIdOffset(
|
| + EventConverterEvdev* converter) {
|
| + if (converter->HasTouchscreen()) {
|
| + converter->SetTouchIdOffset(next_touch_id_offset_);
|
| + next_touch_id_offset_ += converter->GetTouchPoints();
|
| + }
|
| +}
|
| +
|
| void InputDeviceFactoryEvdev::UpdateDirtyFlags(
|
| const EventConverterEvdev* converter) {
|
| if (converter->HasTouchscreen())
|
|
|