mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[GH-ISSUE #880] Remote Desktop Client captures mouse input on server while on client #701
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#701
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BrockU-CentreForDigitalHumanities on GitHub (Sep 23, 2020).
Original GitHub issue: https://github.com/debauchee/barrier/issues/880
Describe the bug
Remote Desktop window incorrectly displays cursor (jittering near 0,0) and registers intermittent input from mouse on Barrier Server (MacOS) even if cursor is moved to Barrier Client (MacOS). Leads to spurious input on remote machine (dangerous).
To Reproduce
Steps to reproduce the behavior:
[2020-09-23T13:35:40] DEBUG2: no-op from
[2020-09-23T13:35:40] DEBUG2: mouse move +997.308594,+586.960938
[2020-09-23T13:35:40] DEBUG2: onMouseMoveSecondary -26,+11
Expected behavior
When Remote Desktop is running on Barrier Server and Cursor is moved to Barrier Client, Cursor should only appear on client and provide events on client. Cursor should not appear or provide input on Remote Desktop Window until cursor is moved back to Barrier Server.
There are no issues when Remote Desktop is running on Barrier Client.
Desktop:
Additional context
Likely a problem with secondary display handling due to Remote Desktop Window appearing on Barrier Server. Problem Function seems to be OSXScreen::onMouseMove()
@maelcum commented on GitHub (Oct 27, 2020):
Can confirm behavior - to some extent - with Microsoft Remote Desktop v10.4.1 (1825) and Apple macOS 10.15.7.
Moving from Barrier_server to Barrier_client:
My observation is that the mouse pointer successfully changes from (the screen of) Barrier_server to (the screen of) Barrier_client.
on the Barrier_server:
At this point, the mouse pointer is placed in the middle of the monitor (horizontally as well as vertically). It should now disappear.
i. If a Remote Desktop client window has been open, but not been active, the mouse pointer disappears as expected.
ii. If a Remote Desktop client window has been active, the mouse pointer does not disappear. This is also true when the Remote Desktop client has been in fullscreen mode (as it is the active window at this point).
iii. (Only) If a Remote Desktop client window overlaps the middle of the screen, the mouse pointer (which is placed in the middle of the screen) is placed in the Remote Desktop client window.
on the Barrier_client:
The mouse pointer shows up and continuing to move the mouse, moves the pointer as expected. No problem yet.
If the Remote Desktop client on Barrier_Server has been in Fullscreen mode, then (and only then) will moving the mouse pointer on the Barrier_client make the mouse pointer on Barrier_Server jitter.
Moving back from Barrier_client to Barrier_server:
Moving the mouse pointer back from Barrier_client to Barrier_server works as well.
If a Remote Desktop client window had happened to overlap the position in the middle of the screen (and the mouse pointer thus been placed there visibly) (eg. case iii from above), it sometimes happens that the mouse pointer does not snap back to where the mouse pointer should enter the screen on Barrier_server. Instead, movement of the mouse pointer (which should start at the screen border) starts from the position on the middle of the screen, making it look as if the Remote Desktop client window had somehow snatched the pointer. In my experiments, this happens most often when the mouse pointer was moved rapidly from one screen to the other.
At no point have I observed the Barrier_server Remote Desktop client window actually acted upon anything the mouse pointer does on the Barrier_client. It just looks that way, because the mouse pointer changes its shape from Mac to Windows, and in case of a fullscreen Remote Desktop, the mouse pointer jitters.
Testing was done with the Barrier_server to the right and the Barrier_client to the left.
An active Remote Desktop client window was moved in the middle of Barrier_server, and to the very side left and right side of the screen to observe the mouse pointer in different states.
From my view, this might be a unique problem in combination with the Microsoft Remote Desktop client. A VMware Fusion client window, also prone to capturing the mouse pointer, does not cause any problem.
I've attached a screenshot, which shows
-- with Safari.app open on the right side
-- with a Remote Desktop client window open at the left side, off-center (note the menu bar, which says "Microsoft Remote Desktop", thus stating that the window is indeed active)
-- and a mouse pointer (Mac style) right in the middle of the screen, hovering above the Safari background of github (which should not be there, as the mouse pointer is currently on Barrier_client).
I've attached another screenshot, which shows
-- with Safari.app open on the right side
-- with a Remote Desktop client window open, overlapping the center of the screen and active
-- and a mouse pointer (Windows style) right in the middle of the screen, hovering above the Remote Desktop client window (which should not be there, as the mouse pointer is currently on Barrier_client).
The screenshots were made with a timeout of 5 secs, during which I moved the mouse to Barrier_client. :)

Update:

And FWIW another screenshot where the Remote Desktop client is fullscreen, with the mouse pointer dead center.