From 749943380ae7a9c7a7e507103a5cdaca48ff734f Mon Sep 17 00:00:00 2001 From: Mr P-Tech Date: Tue, 11 Aug 2026 13:36:19 +0100 Subject: [PATCH] fix(control): drive the host pointer directly --- apps/desktop/src/main/input/injector.test.ts | 8 ++------ apps/desktop/src/main/input/injector.ts | 7 +++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/desktop/src/main/input/injector.test.ts b/apps/desktop/src/main/input/injector.test.ts index 70106b1..a560f07 100644 --- a/apps/desktop/src/main/input/injector.test.ts +++ b/apps/desktop/src/main/input/injector.test.ts @@ -199,11 +199,7 @@ describe('Input Injector', () => { }); describe('mouse move events', () => { - // Two-cursor mode: the remote participant's movement drives their own - // cursor overlay, never the host's physical pointer. Hijacking it on - // every move is what made control feel like the host's mouse had been - // taken away. The pointer is only borrowed at the moment of a click. - it('does not move the host pointer for remote movement', async () => { + it('moves the host pointer continuously for remote movement', async () => { const event: MouseMoveEvent = { type: 'mouse', action: 'move', @@ -213,7 +209,7 @@ describe('Input Injector', () => { await injectInput(event); - expect(mouse.setPosition).not.toHaveBeenCalled(); + expect(mouse.setPosition).toHaveBeenCalledWith({ x: 960, y: 540 }); }); it('positions the pointer at the remote cursor when a click lands', async () => { diff --git a/apps/desktop/src/main/input/injector.ts b/apps/desktop/src/main/input/injector.ts index 37869f5..1565f45 100644 --- a/apps/desktop/src/main/input/injector.ts +++ b/apps/desktop/src/main/input/injector.ts @@ -21,6 +21,13 @@ function getInjector(): RemoteInputInjector { injector ??= new RemoteInputInjector({ // Platform facts come from the app's Electron-aware detection. selection, + // PairUX is a remote-control application: while a guest has control, + // their pointer must drive the host's *real* cursor continuously. The + // library's two-cursor mode is useful for annotations, but on Wayland it + // can only approximate a second cursor and makes normal host navigation + // feel disconnected from the mouse. Control revocation and the emergency + // stop hotkey remain the host's immediate way to take the cursor back. + virtualCursor: false, // Keep remote input one pixel off the screen edge on Linux: GNOME's // Activities hot-corner fires from the corner pixel, so a guest brushing // it would take over the host's desktop. One pixel is enough to miss the