mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[GH-ISSUE #379] Mouse offset bug #298
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#298
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 @wjtk4444 on GitHub (Jul 28, 2019).
Original GitHub issue: https://github.com/debauchee/barrier/issues/379
Operating Systems
Server: Arch Linux
Client: Windows 7, Windows 10 (various editions, various compilation numbers)
There's a high possibility that the bug is platform independent, at the very least it seems to occur on any X11 host and any Windows client.
Barrier Version
2.1.2-2 server
2.2 and 2.3 client
The bug should be present on any version
Steps to reproduce bug
Expected behaviour
Cursor moves between screens as when not locked
Actual behaviour
Cursor moves between screens and moves the in-game camera by a certain offset, for example:
NOTE
It does happen anywhere, not just in the fullscreen applications, but it's hard to notice it unless the cursor movement moves the camera or something else. If my explanation what happens is not clear enough - I can record a video of the bug happening.
Workaround
This seems to fix the issue, but is quite annoying to do every single time.
Steps to fix the problem
I'm not familiar with the codebase, but I expect it to be a one-liner or something similar.
screen.moveCursor(screen.width / 2, screen.height / 2);To prevent this issue from occuring under any circumstances, I think that the client position should be set to the screen middle when locking even if mouse is currently on another screen. So, perhaps something like this instead:
Additional notes
One could try checking if it only occurs on Windows or not and add some conditions before moving the cursor (might not be necessary on other systems or reverse configurations - Windows host and Linux guest). I don't think it's necessary though, locking/unlocking doesn't happen too often and I personally won't be bothered if it resets cursor position on all screens.
Also, can we please get https://github.com/debauchee/barrier/issues/187 done? It probably needs a little more work (adding a checkbox and a config flag) but it would be awesome to have in addition to fixing the offset bug.
@upgrayedd22 commented on GitHub (Aug 7, 2019):
I think that I have this issue, too. Mac (Mojave) 10.14.6 is server. Laptop (Windows 2012 server) is client. When I move the cursor off screen to the PC, the Windows cursor seems to pull to the top-left. On my Mac's screen, I can see the pointer directly in the middle of the screen, while I move the cursor on the PC, simultaneously.
The way I was able to test the "pulling" was by moving the server mouse in tiny circles. I tried the workaround offerred by wjtk4444, but I cannot seem to get the hotkeys to work.
I have a razor keyboard and mouse plugged in. When I use the Mac's touch pad in Windows, it does not seem to be affected by the "pulling".
@iaian7 commented on GitHub (Aug 23, 2019):
Same bug between a Mac Pro and a MacBook Pro running MacOS 10.13.6 (server) and MacOS 10.14.6 (client). The mouse moves much faster toward the upper left, so it's very difficult to use. Moving the mouse in a circle displays this error really well. Same bug prevented me from using Synergy too.