utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.87k stars 1.34k forks source link

Double cursor bug while using an external mouse and stage manager in UTM remote #6363

Open tannerellen opened 5 months ago

tannerellen commented 5 months ago

Describe the issue If you use an external mouse and have UTM open with another app in stage manager then the native mouse cursor will show along side the VM mouse cursor. This causes an issue where the VM mouse cursor gets blocked from moving the full size of the VM window. The bug will appear once you switch to another window and then return to UTM.

Configuration (required)

osy commented 5 months ago

I tried this out and it seems to be a limitation of iOS stage manager. The idea is that if you have multiple windows on screen, no app can "capture" the cursor or hide the cursor. I see something similar on visionOS. I think a solution would be: if we detect we are in stage manager with multiple windows, then switch cursor from relative mode (which requires capturing) to absolute mode (which requires the guest to support tablet devices and is not always a given). I'm not actually sure there's an API to detect if there's other apps in stage manager so this will be tricky (involve seeing if our own window size has changed).