[GH-ISSUE #1629] Mouse enters server screen at wrong position #1204

Open
opened 2026-05-05 07:36:05 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @DeeeeLAN on GitHub (Apr 1, 2022).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1629

What happened?

I have a setup as follows:

+----------+  +------------------+ 
|Windows 7 |  |Win 10 2nd monitor| 
|          |  |                  | +----------------------+
+----------+  +------------------+ |Win 10 primary monitor|
                                   |                      |
                                   +----------------------+

Windows 7 is configured as a client, windows 10 is the server. I do not have barrier installed on windows 10, I run it from the command line. My config file doesn't have anything special, it just creates the relationship between the two screens.

When I move my mouse off the left edge of my second win10 monitor, it correctly appears in place on the right edge of the win7 monitor. However, when moving back from win7 to win10, most times (but not every time, strangely), the cursor reappears on the right edge of the win10 second monitor.

I don't know if it is relevant or not, but the output in the command line window shows the x coordinate as positive when moving from win10 (work) to win7, but negative when moving back:

image

Version

From Git HEAD or commit (specify below)

Git commit hash (if applicable)

a2fcf662

If applicable, where did you install Barrier from?

Azure pipeline build 20220307.1 windows release, running from command line without install.

What OSes are you seeing the problem on? (Check all that apply)

Windows

What OS versions are you using?

7 for client, 10 for server.

Relevant log output

[2022-03-31T17:35:42] INFO: switch from "Work" to "Win7" at 3839,973
[2022-03-31T17:35:42] INFO: leaving screen
[2022-03-31T17:35:42] INFO: switch from "Win7" to "Work" at -3838,-254
[2022-03-31T17:35:42] INFO: entering screen
[2022-03-31T17:35:47] INFO: switch from "Work" to "Win7" at 3839,923
[2022-03-31T17:35:47] INFO: leaving screen
[2022-03-31T17:35:53] INFO: switch from "Win7" to "Work" at -3838,-114
[2022-03-31T17:35:53] INFO: entering screen
[2022-03-31T17:35:59] INFO: switch from "Work" to "Win7" at 3839,830
[2022-03-31T17:35:59] INFO: leaving screen
[2022-03-31T17:36:02] INFO: switch from "Win7" to "Work" at -3839,-262
[2022-03-31T17:36:02] INFO: entering screen
[2022-03-31T17:36:29] INFO: switch from "Work" to "Win7" at 3839,832

Any other information

No response

Originally created by @DeeeeLAN on GitHub (Apr 1, 2022). Original GitHub issue: https://github.com/debauchee/barrier/issues/1629 ### What happened? I have a setup as follows: ``` +----------+ +------------------+ |Windows 7 | |Win 10 2nd monitor| | | | | +----------------------+ +----------+ +------------------+ |Win 10 primary monitor| | | +----------------------+ ``` Windows 7 is configured as a client, windows 10 is the server. I do not have barrier installed on windows 10, I run it from the command line. My config file doesn't have anything special, it just creates the relationship between the two screens. When I move my mouse off the left edge of my second win10 monitor, it correctly appears in place on the right edge of the win7 monitor. However, when moving back from win7 to win10, most times (but not every time, strangely), the cursor reappears on the right edge of the win10 second monitor. I don't know if it is relevant or not, but the output in the command line window shows the x coordinate as positive when moving from win10 (work) to win7, but negative when moving back: ![image](https://user-images.githubusercontent.com/12877032/161172215-b44504c2-8623-41d6-9fd6-cbe23ff4a581.png) ### Version From Git HEAD or commit (specify below) ### Git commit hash (if applicable) a2fcf662 ### If applicable, where did you install Barrier from? Azure pipeline build 20220307.1 windows release, running from command line without install. ### What OSes are you seeing the problem on? (Check all that apply) Windows ### What OS versions are you using? 7 for client, 10 for server. ### Relevant log output ```shell [2022-03-31T17:35:42] INFO: switch from "Work" to "Win7" at 3839,973 [2022-03-31T17:35:42] INFO: leaving screen [2022-03-31T17:35:42] INFO: switch from "Win7" to "Work" at -3838,-254 [2022-03-31T17:35:42] INFO: entering screen [2022-03-31T17:35:47] INFO: switch from "Work" to "Win7" at 3839,923 [2022-03-31T17:35:47] INFO: leaving screen [2022-03-31T17:35:53] INFO: switch from "Win7" to "Work" at -3838,-114 [2022-03-31T17:35:53] INFO: entering screen [2022-03-31T17:35:59] INFO: switch from "Work" to "Win7" at 3839,830 [2022-03-31T17:35:59] INFO: leaving screen [2022-03-31T17:36:02] INFO: switch from "Win7" to "Work" at -3839,-262 [2022-03-31T17:36:02] INFO: entering screen [2022-03-31T17:36:29] INFO: switch from "Work" to "Win7" at 3839,832 ``` ### Any other information _No response_
Author
Owner

@DeeeeLAN commented on GitHub (Apr 1, 2022):

As far as I can tell, when I re-enter the win10 machine and the cursor is correctly on the left side, the log output remains the same with the x coordinate negative.

<!-- gh-comment-id:1085281214 --> @DeeeeLAN commented on GitHub (Apr 1, 2022): As far as I can tell, when I re-enter the win10 machine and the cursor is correctly on the left side, the log output remains the same with the x coordinate negative.
Author
Owner

@DeeeeLAN commented on GitHub (Apr 1, 2022):

I just noticed I am pretty sure it has to do with the offset of my secondary and primary monitors on the win10 machine. If I move the mouse back and forth on the bottom left corner of the monitor, it enters at the same place. When I enter and leave at the top of the screen above where the primary monitor ends, it reappears in the wrong position. I imagine this must be due to Barrier not having multi monitor awareness, so it is trying to treat all the pixels as a single rectangle when in reality I have something else going on.

<!-- gh-comment-id:1085284836 --> @DeeeeLAN commented on GitHub (Apr 1, 2022): I just noticed I am pretty sure it has to do with the offset of my secondary and primary monitors on the win10 machine. If I move the mouse back and forth on the bottom left corner of the monitor, it enters at the same place. When I enter and leave at the top of the screen above where the primary monitor ends, it reappears in the wrong position. I imagine this must be due to Barrier not having multi monitor awareness, so it is trying to treat all the pixels as a single rectangle when in reality I have something else going on.
Author
Owner

@DeeeeLAN commented on GitHub (Apr 1, 2022):

It looks like when I am leaving the server, it is correctly mapping the top left corner of the second monitor to 0,0 and drawing a rectangle to the bottom right of the primary monitor for the "logical" screen. The total vertical pixel count would be 2640, and leaving at the top left it indicates a Y of 0, while the bottom left indicates a Y of 2159. However, when moving back from the client to the server, the Y value is no longer mapping. Entering the server anywhere from -1440 to -1 indicates a matching Y, and the cursor appears on the right edge at the same Y value. Entering the server between 0 and 719 lets the cursor appear in the correct position, at least once I updated the links section as follows. Previously it was jumping to the bottom right corner when crossing at the bottom edge as well, but this change seems to have fixed it.

section: links
   Win7:
      right(0, 100) = Work(0, 81.8181818182)

   Work:
      left(0, 81.8181818182) = Win7(0, 100)
end

These values should map to the correct proportions.

So to my mind, it appears the bug is the server is not correctly mapping the Y value from the client to the Y value on the server side, even though it does it fine when it leaves the screen.

<!-- gh-comment-id:1085309475 --> @DeeeeLAN commented on GitHub (Apr 1, 2022): It looks like when I am leaving the server, it is correctly mapping the top left corner of the second monitor to 0,0 and drawing a rectangle to the bottom right of the primary monitor for the "logical" screen. The total vertical pixel count would be 2640, and leaving at the top left it indicates a Y of 0, while the bottom left indicates a Y of 2159. However, when moving back from the client to the server, the Y value is no longer mapping. Entering the server anywhere from -1440 to -1 indicates a matching Y, and the cursor appears on the right edge at the same Y value. Entering the server between 0 and 719 lets the cursor appear in the correct position, at least once I updated the links section as follows. Previously it was jumping to the bottom right corner when crossing at the bottom edge as well, but this change seems to have fixed it. ``` section: links Win7: right(0, 100) = Work(0, 81.8181818182) Work: left(0, 81.8181818182) = Win7(0, 100) end ``` These values should map to the correct proportions. So to my mind, it appears the bug is the server is not correctly mapping the Y value from the client to the Y value on the server side, even though it does it fine when it leaves the screen.
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#1204
No description provided.