Skip to content

fix(ei): add regions for touch support - #2115

Merged
ids1024 merged 1 commit into
Smithay:masterfrom
hojjatabdollahi:hojjat/ei-touch
Jul 30, 2026
Merged

fix(ei): add regions for touch support#2115
ids1024 merged 1 commit into
Smithay:masterfrom
hojjatabdollahi:hojjat/ei-touch

Conversation

@hojjatabdollahi

@hojjatabdollahi hojjatabdollahi commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

Adds ei region for ei touch. And unifies the ei regions for pointer and touch.

Depends on:

Checklist

Comment thread src/backend/libei/mod.rs
Comment on lines +302 to +305
EisRequest::Frame(event) => event
.device
.has_capability(reis::request::DeviceCapability::Touch)
.then_some(InputEvent::TouchFrame { event }),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'm not 100% sure about my solution.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I guess this is actually a reis bug then. It looks like eis_queue_event in libeis uses a device->pending_event_queue.

@ids1024 ids1024 Jul 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hojjatabdollahi hojjatabdollahi Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@codecov-commenter

codecov-commenter commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.43%. Comparing base (39cd5f1) to head (5c78b5e).
⚠️ Report is 2 commits behind head on master.

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     
Flag Coverage Δ
wlcs-buffer 15.18% <ø> (ø)
wlcs-core 14.76% <ø> (-0.01%) ⬇️
wlcs-output 6.57% <ø> (ø)
wlcs-pointer-input 16.40% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ids1024

ids1024 commented Jul 30, 2026

Copy link
Copy Markdown
Member

I've released reis 0.7.1.

@ids1024
ids1024 merged commit 5fb12b8 into Smithay:master Jul 30, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants