fix(ei): add regions for touch support - #2115
Conversation
fca9ad9 to
9a9408e
Compare
| EisRequest::Frame(event) => event | ||
| .device | ||
| .has_capability(reis::request::DeviceCapability::Touch) | ||
| .then_some(InputEvent::TouchFrame { event }), |
There was a problem hiding this comment.
Hm, ei_device.frame isn't specific to touch input. Should we somehow restrict this to only frames that include at least one touch event?
There was a problem hiding this comment.
AFAIK devices are created per-capability, so touch gets its own device and reis already drops empty frames.
But I think pending_requests could cause issues since it's one queue per connection, not per device, so a frame on the touch device can commit another devices's events. I have been looking into that today, so I understand it better.
There was a problem hiding this comment.
Alright, I'm not 100% sure about my solution.
There was a problem hiding this comment.
Ah, I guess this is actually a reis bug then. It looks like eis_queue_event in libeis uses a device->pending_event_queue.
There was a problem hiding this comment.
Since smithay's abstraction doesn't add more than one capability to the touch device, I guess nothing needs to be done for this here if reis used a per-device queue.
There was a problem hiding this comment.
Yeah, there is also a worse symptom, one frame drains the whole queue, so if two devices are framed, the second one is silently dropped.
Should I remove my second commit, and wait for an update to reis?
There was a problem hiding this comment.
I went ahead and opened a PR, in my tests, it sends the frames when it should and drops unframed events. Leave the rest up to you.
e2a56d2 to
3c19dba
Compare
3c19dba to
5c78b5e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2115 +/- ##
==========================================
- Coverage 17.44% 17.43% -0.01%
==========================================
Files 187 187
Lines 30928 30928
==========================================
- Hits 5394 5393 -1
- Misses 25534 25535 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I've released reis 0.7.1. |
5c78b5e to
cc109d7
Compare
Description
Adds ei region for ei touch. And unifies the ei regions for pointer and touch.
Depends on:
Checklist