microsoft / microsoft/PowerToys

MWB: delayed switch back to Mac when Windows is controlled remotely

Open
#44,764 0 comments 0 reactions 0 assignees View on GitHub
Product-Mouse Without Borders
Dominant language
C
Stars
139k
Forks
8.6k
PR merge metrics
PR metrics pending

Description

## Summary
When using Mouse Without Borders with a Mac client (Swift implementation of the MWB protocol), the Windows -> Mac transition has a noticeable pause only when the physical keyboard/mouse are connected to the Mac. If the hardware is connected to Windows, both directions are smooth.

## Repro
1. Connect keyboard/mouse to Mac.
2. Connect Mac client to Windows PowerToys MWB (port 15101).
3. Move cursor from Mac to Windows (smooth).
4. Move back from Windows to Mac (noticeable pause before control resumes on Mac).
5. Move hardware to Windows: both directions are smooth.

## Expected
Windows -> Mac transition is as smooth as when hardware is on Windows.

## Actual
Pause occurs only on Windows -> Mac transition when Windows is being controlled remotely.

## Notes / suspicion
- Mac resumes control immediately on receiving `NextMachine`, so delay seems to be before Windows sends `NextMachine`.
- Windows receiver path for remote mouse input: `Receiver.cs` (relative mouse) -> `MachineStuff.MoveToMyNeighbourIfNeeded` -> `Common.SendNextMachine`.
- Local hardware path uses `Event.MouseEvent`, which appears to switch with less latency.
- Possible debounces in `MachineStuff` and `Common.SendNextMachine` may add delay only on the receiver path.

## Environment
- PowerToys version: v0.94.0
- Windows version/build: Windows 11 10.0.22631 (Build 22631)
- macOS version: 26.2 (25C56)
- Mac client: MWBMenuBar (Swift, MWB protocol)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Windows receiver path in Receiver.cs through MachineStuff.MoveToMyNeighbourIfNeeded and Common.SendNextMachine, then compare it with the local Event.MouseEvent path. Investigate the suspected debounces and timing around NextMachine delivery using the reported reproduction. Done means the Windows-to-Mac transition is as smooth as the reverse transition when hardware is connected to the Mac.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, swift
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.