[PR #387] [CLOSED] Use absolute pointer coordinates to move back to the host screen #401

Closed
opened 2026-05-05 22:18:18 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/feschber/lan-mouse/pull/387
Author: @whot
Created: 2/12/2026
Status: Closed

Base: mainHead: wip/absolute-pointer


📝 Commits (1)

  • 49edfbb Use absolute positioning for remote-desktop emulation

📊 Changes

4 files changed (+116 additions, -74 deletions)

View changed files

📝 input-emulation/src/error.rs (+2 -0)
📝 input-emulation/src/libei.rs (+80 -5)
📝 src/emulation.rs (+12 -1)
📝 src/service.rs (+22 -68)

📄 Description

I'm filing this as Draft because I need some feedback whether this is the right thing to do or whether I'm missing something here.

Testing lan-mouse on two Fedora 43 hosts here, main machine in front of me and a laptop to the right. Moving the mouse to the laptop works fine but it got stuck moving back. As far as I can tell (and Claude seemed to confirm this) lan-mouse is trying to use inputcapture on the remote to detect a barrier entry. This cannot work, those two sessions are fundamentally incompatible (remote desktop input does not count as input for inputcapture purposes1).

Which means we can't rely on barriers on the remote - but since we know the remote's dimensions and we control the events we convert the relative coords from the mouse to absolute coordinates on the remote screen. And whenever we detect a movement off that area, we release() the inputcapture session and are back to the local screen.

Now, this works with my local setup but maybe I'm missing something?

AI disclaimer: written by claude code and stared long and hard at by me :)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.


  1. this may not be spelled out anywhere and ultimately depends on the compositor anyway but I never even considered this case when spec-ing the portal :) ↩︎

## 📋 Pull Request Information **Original PR:** https://github.com/feschber/lan-mouse/pull/387 **Author:** [@whot](https://github.com/whot) **Created:** 2/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `wip/absolute-pointer` --- ### 📝 Commits (1) - [`49edfbb`](https://github.com/feschber/lan-mouse/commit/49edfbbb6487f01c9ddb54b99ec65e6f2b7c6c96) Use absolute positioning for remote-desktop emulation ### 📊 Changes **4 files changed** (+116 additions, -74 deletions) <details> <summary>View changed files</summary> 📝 `input-emulation/src/error.rs` (+2 -0) 📝 `input-emulation/src/libei.rs` (+80 -5) 📝 `src/emulation.rs` (+12 -1) 📝 `src/service.rs` (+22 -68) </details> ### 📄 Description I'm filing this as Draft because I need some feedback whether this is the right thing to do or whether I'm missing something here. Testing lan-mouse on two Fedora 43 hosts here, main machine in front of me and a laptop to the right. Moving the mouse to the laptop works fine but it got stuck moving back. As far as I can tell (and Claude seemed to confirm this) lan-mouse is trying to use inputcapture on the remote to detect a barrier entry. This cannot work, those two sessions are fundamentally incompatible (remote desktop input does not count as input for inputcapture purposes[^1]). Which means we can't rely on barriers on the remote - but since we know the remote's dimensions and we control the events we convert the relative coords from the mouse to absolute coordinates on the remote screen. And whenever we detect a movement off that area, we `release()` the inputcapture session and are back to the local screen. Now, this works with my local setup but maybe I'm missing something? AI disclaimer: written by claude code and stared long and hard at by me :) [^1]: this may not be spelled out anywhere and ultimately depends on the compositor anyway but I never even considered this case when spec-ing the portal :) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 22:18:18 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/lan-mouse#401
No description provided.