Ei protocol support using reis - #2051
Conversation
71ae5fa to
874c288
Compare
|
EisRequest::DeviceClosed(event) => Some(InputEvent::DeviceRemoved { device: event.device })
|
|
I've released reis 0.7.0. It would be good to get this merged. If anything needs to be changed in the future, smithay doesn't have a particularly stable API. The main blocker here was coming up with a decent API, which I think the API I added here in January is pretty solid. The cosmic-comp support needn't block this since we have support in The |
874c288 to
7bbd414
Compare
The EI protocol is needed for the xdg-desktop-portal `RemoteDesktop` portal to emulate input devices, as well as by the `InputCapture` portal for Synergy-like uses (input-leap supports Wayland with this portal). This exposes a relatively simple API for a compositor to create EI seats and devices, mirroring the `Seat` API. It also provides an `InputBackend` that converts emulated input to Smithay input events. Receiver contexts for the `InputCapture` portal are also a bit more complicated to implement. Those involve capturing input once the cursor crosses outside the display. That isn't implemented at all here yet. We may want to change things in the future to accommodate receiver contexts, etc. But this API is fairly minimal to use, so future breaking changes shouldn't be too challenging for a compositor to adapt to.
This seems a bit awkward to support on other backends given how Anvil uses `process_input_event_windowed` there... This implementation creates a socket file and sets `LIBEI_SOCKET` to allow sending emulated input events to Anvil.
update reis
7bbd414 to
f825180
Compare
|
1d235ca seems out of place here? |
|
It's needed for enabling ei_portal in xwayland. Do you suggest I open a separate PR for that? |
|
Ah, right. I guess that's reasonable then. |
ids1024
left a comment
There was a problem hiding this comment.
This will need another review from someone other than me, but I think it should all be good to merge. We can add anything like ei_text later. It's nice to eventually merge things instead of repeatedly re-basing and updating the same commits.
Description
based on #1388
It also pulls in the changes in ids1024/reis#12
Checklist