[GH-ISSUE #880] Remote Desktop Client captures mouse input on server while on client #701

Open
opened 2026-05-05 06:57:54 -06:00 by gitea-mirror · 1 comment
Owner

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:

  1. Install Barrier 2.3.3 Server (macOS) client (macOS), Install Microsoft Remote Desktop Client Version 10.4.0 (1811) (MSRDC) on Barrier Server computer.
  2. Start Barrier Server and Client.
  3. Launch Remote Desktop Session. When you are logged into Remote Desktop window move cursor to Barrier Client. Cursor will hover and jitter around 0,0 on Remote Desktop window and occasionally register input events (happens in both windows and fullscreen).
  4. See error
    [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:

  • Barrier version 2.3.3
  • OS: Barrier Server (macOS 10.15.5), Barrier Client (macOS 10.14.6)
  • Microsoft Remote Desktop Client Version 10.4.0 (1811) (MSRDC)
  • Remote OS: Windows server 2016

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()

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: 1. Install Barrier 2.3.3 Server (macOS) client (macOS), Install Microsoft Remote Desktop Client Version 10.4.0 (1811) (MSRDC) on Barrier Server computer. 2. Start Barrier Server and Client. 3. Launch Remote Desktop Session. When you are logged into Remote Desktop window move cursor to Barrier Client. Cursor will hover and jitter around 0,0 on Remote Desktop window and occasionally register input events (happens in both windows and fullscreen). 4. See error [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:** - Barrier version 2.3.3 - OS: Barrier Server (macOS 10.15.5), Barrier Client (macOS 10.14.6) - Microsoft Remote Desktop Client Version 10.4.0 (1811) (MSRDC) - Remote OS: Windows server 2016 **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()
Author
Owner

@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.

Cursor should not appear or provide input on Remote Desktop Window until cursor is moved back to Barrier Server.

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

  • the Barrier_server
    -- 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).

Barrier_server_while_mouse_pointer_is_on_Barrier_client_while_RDP_session_is_open

I've attached another screenshot, which shows

  • the Barrier_server
    -- 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. :)
Barrier_server_while_mouse_pointer_is_on_Barrier_client_while_RDP_session_is_open2

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

<!-- gh-comment-id:717471908 --> @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. > Cursor should not appear or provide input on Remote Desktop Window until cursor is moved back to Barrier Server. 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 - the Barrier_server -- 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). ![Barrier_server_while_mouse_pointer_is_on_Barrier_client_while_RDP_session_is_open](https://user-images.githubusercontent.com/126681/97349503-d81b7480-188f-11eb-9290-707929613552.png) I've attached another screenshot, which shows - the Barrier_server -- 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. :) ![Barrier_server_while_mouse_pointer_is_on_Barrier_client_while_RDP_session_is_open2](https://user-images.githubusercontent.com/126681/97349994-73144e80-1890-11eb-837e-5aa606159564.png) Update: And FWIW another screenshot where the Remote Desktop client is fullscreen, with the mouse pointer dead center. ![Barrier_server_while_mouse_pointer_is_on_Barrier_client_and_RDP_session_is_fullscreen](https://user-images.githubusercontent.com/126681/97350414-e322d480-1890-11eb-880b-3dcc42dc5c9c.png)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#701
No description provided.