Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions apps/desktop/src/main/input/injector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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 () => {
Expand Down
7 changes: 7 additions & 0 deletions apps/desktop/src/main/input/injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading