Repository navigation
Conversation
…portal (#1040) Serve mutter 51's InputCapture interface to the authenticated installed portal: sessions with GetZones, AddBarrier (mutter's check_barrier rules and messages), ClearBarriers, Enable/Disable, ConnectToEIS, Release with an optional cursor position, and Close. Relative motion crossing an enabled barrier activates capture: clients get no pointer, button, scroll or key input, which goes to the session's EIS client instead, until Release, Disable, Close, a monitor change, Super+Shift+Escape, lock or owner loss. Never captures while locked. Signed-off-by: James Reilly <jreilly1821@gmail.com>
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes part of #1040 (ledger row P-SY-13, added in #1052). Part of #577.
Follows mutter 51.0
meta-input-capture.c,meta-input-capture-session.c,org.gnome.Mutter.InputCapture.xml, and xdg-desktop-portal-gnomeinputcapture.c. The real 51 XML isGetZones,AddBarrier(u, (iiii)),ClearBarriers,Enable,Disable,ConnectToEIS,Release(a{sv}),Close; signalsActivated,Deactivated,ZonesChanged,Disabled,Closed.Authority::admit_portal) creates sessions; session methods require the owner and are refused while locked; signals go to the owner only. Lock closes every session; the 100 ms revocation scan removes them on owner loss.check_barrier(order and messages); ids are the lowest free from 1.Activated(barrier, activation id, crossing point); pointer/button/scroll/key input then goes to the session's EIS client (pointer + keyboard devices, reis) instead of clients. Ends onRelease(optional warp),Disable,Close, monitor change, Super+Shift+Escape, lock, owner loss. Captured input still counts as activity.mutter/input_capture.rs(interface, state machine, router),mutter/capture_eis.rs(EIS worker),runtime/input_capture.rs(one hook in the DRM input handler,revoke_allinengage_lock);remote_eis.rskeymap memfd code shared.docs/input-capture.md; rows indocs/protocols.mdanddocs/security-model.md.Recorded divergences (docs):
Disabledis emitted when the compositor disables a session itself (mutter declares but never sends it);SupportedCapabilities= 3; a barrier on no monitor edge is refused with a message; keys held across capture start/stop release to where they were pressed; barriers trigger only on relative motion, not under a pointer lock. Not implemented: cursor hiding during capture, the capture-session clipboard, keymap updates during an EIS connection, tablets/absolute pointers crossing barriers, a configurable cancel shortcut.Local checks (clean target):
cargo fmt --all,cargo clippy --workspace --all-targets -D warnings,cargo test -p tuna-compositor --lib(1072 passed, incl. 13input_capture::testsand 2 private-bus tests with a real reis receiver),--test introspect_shell_name --test runtime,scripts/tuna-test-strategy. Not run: the real portal with Input Leap/Deskflow on a hardware session (the hook is in the DRM input path; the nested backend does not capture).