Skip to content

feat(hook): hand off Flow at KDE Wayland screen edges - #2545

Draft
bettodiaz wants to merge 4 commits into
AprilNEA:masterfrom
bettodiaz:feat/hook-kwin-screen-edge-pr
Draft

bettodiaz wants to merge 4 commits into
AprilNEA:masterfrom
bettodiaz:feat/hook-kwin-screen-edge-pr

Conversation

@bettodiaz

Copy link
Copy Markdown

Summary

Flow's edge handoff is off on a Wayland session because an ordinary client can't read the cursor. On KDE Plasma this adds a small KWin script that tells the agent when the cursor pushes into a screen edge, and places the cursor on arrival. It never captures input. Related to #2360, which only asks for a notice; this is the working path for KDE.

I tried the InputCapture portal first, but on KDE a live capture swallows all input system-wide until released, so I dropped it.

Changes

  • openlogi-core: a virtual absolute pointer device, OL pointer placement.
  • openlogi-hook: serves org.openlogi.Edge on the session bus, reads the screen layout from xdg-output, and moves the cursor with the virtual pointer. The script lives in crates/openlogi-hook/kwin-script/.
  • openlogi-agent-core: a third pointer mode for KDE Wayland that turns an edge call into the same crossing the polling thread reports, places the cursor on arrival, and ignores edge calls for 1 s after a placement so the cursor can't bounce straight back.

Testing

  • cargo fmt --all -- --check, cargo test --workspace (4777 passed), rustdoc for the non-GUI crates: pass.
  • cargo clippy --workspace --all-targets -- -D warnings: fails on 8 map_unwrap_or lints in openlogi-core files this PR doesn't touch (Rust 1.100). Clean on the crates this PR changes.
  • Not run: ast-grep, typos, cargo-deny, the macOS and Windows jobs, the wasm check.
  • Hardware: verified live on one KDE Plasma 6.8 Wayland laptop (stepped two-display layout) with a Mac peer, for handoffs to the Mac and returns to the laptop. Not tested on GNOME or wlroots, or with other layouts.

Known limits: KDE only, the script has to be installed and enabled by hand, and "require Control" can't be honoured on Wayland.

This branch has not been deployed

No deployments
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.

1 participant