[GH-ISSUE #1783] Mouse switches client when a fullscreen game is running #1309

Open
opened 2026-05-05 07:43:01 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @Crylia on GitHub (Sep 19, 2022).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1783

What happened?

While trying to play some games I noticed that its not possible because the mouse will leave the screen when I'm turning. This is really annoying and I wonder if there is a way have the application stay focused. The game runs in windows fullscreen btw.

Version

v2.4.0

Git commit hash (if applicable)

No response

If applicable, where did you install Barrier from?

apt

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

Linux

What OS versions are you using?

Pop!_OS 22.04

Relevant log output

No response

Any other information

No response

Originally created by @Crylia on GitHub (Sep 19, 2022). Original GitHub issue: https://github.com/debauchee/barrier/issues/1783 ### What happened? While trying to play some games I noticed that its not possible because the mouse will leave the screen when I'm turning. This is really annoying and I wonder if there is a way have the application stay focused. The game runs in windows fullscreen btw. ### Version v2.4.0 ### Git commit hash (if applicable) _No response_ ### If applicable, where did you install Barrier from? apt ### What OSes are you seeing the problem on? (Check all that apply) Linux ### What OS versions are you using? Pop!_OS 22.04 ### Relevant log output _No response_ ### Any other information _No response_
Author
Owner

@ForbiddenEra commented on GitHub (Sep 23, 2022):

Some games will hide the cursor and sample mouse input in a relative manner while resetting the cursor position to the center of the screen quite often. You can tell if your particular game does this if you try to turn slowly (but still moving the mouse far enough to switch screens) and the issue doesn't happen but does happen if you move quicker (as your mouse cursor would have to move far enough from the center of the screen between whenever the game resets the cursor to the center of the screen)

Just a random comment/pointer; I'm not sure about fixing it or otherwise, in fact I was just checking out Barrier for the first time as an potential alternative to commercial software.

However, if this is the case for you, implementing a fix may be a bit difficult unless somehow Barrier detects games that do this and blacklists them or somehow disables switching if a game is running or especially full screen. I'm not sure how popular this method of sampling mouse input is, whether it's related to particular engines or input libraries or perhaps older games or otherwise but it is something I've seen before and thought it might be worth mentioning.

<!-- gh-comment-id:1256195776 --> @ForbiddenEra commented on GitHub (Sep 23, 2022): Some games will hide the cursor and sample mouse input in a relative manner while resetting the cursor position to the center of the screen quite often. You can tell if your particular game does this if you try to turn slowly (but still moving the mouse far enough to switch screens) and the issue doesn't happen but does happen if you move quicker (as your mouse cursor would have to move far enough from the center of the screen between whenever the game resets the cursor to the center of the screen) Just a random comment/pointer; I'm not sure about fixing it or otherwise, in fact I was just checking out Barrier for the first time as an potential alternative to commercial software. However, if this is the case for you, implementing a fix may be a bit difficult unless somehow Barrier detects games that do this and blacklists them or somehow disables switching if a game is running or especially full screen. I'm not sure how popular this method of sampling mouse input is, whether it's related to particular engines or input libraries or perhaps older games or otherwise but it is something I've seen before and thought it might be worth mentioning.
Author
Owner

@pramirez commented on GitHub (Dec 7, 2022):

@Crylia hi

You could try with a key to lock the keyboard/mouse on the screen you are on, that's how I do it and when the game starts I lock only on the screen I need and that way the mouse doesn't escape to the other computer

<!-- gh-comment-id:1341744112 --> @pramirez commented on GitHub (Dec 7, 2022): @Crylia hi You could try with a key to lock the keyboard/mouse on the screen you are on, that's how I do it and when the game starts I lock only on the screen I need and that way the mouse doesn't escape to the other computer
Author
Owner

@AngelloDeus commented on GitHub (Jan 3, 2023):

I think thats a useful solution, but it would be better if it detected it automatically, I have used two monitors with the same computer and they don't switch unless it isn't on fullscreen, you have to pause the game to be able to move the cursor to the other monitor, I think they should add this feature as it would enhance the experience, the shortcut works nice but if it were automatically locked it would be nice.

<!-- gh-comment-id:1369311052 --> @AngelloDeus commented on GitHub (Jan 3, 2023): I think thats a useful solution, but it would be better if it detected it automatically, I have used two monitors with the same computer and they don't switch unless it isn't on fullscreen, you have to pause the game to be able to move the cursor to the other monitor, I think they should add this feature as it would enhance the experience, the shortcut works nice but if it were automatically locked it would be nice.
Author
Owner

@jarrard commented on GitHub (May 14, 2024):

YES a option to TICK [Ignore Fullscreen App] AND perhaps even a option to ignore screen switching with EXE/APP option?

NOTE: I understand this project is now eol and there is a new one called input-leap.

even Synergy doesn't have Wayland figured out. Pretty poor considered the premium they ask. (using X11 atm of cause)

<!-- gh-comment-id:2109298399 --> @jarrard commented on GitHub (May 14, 2024): YES a option to TICK [Ignore Fullscreen App] AND perhaps even a option to ignore screen switching with EXE/APP option? NOTE: I understand this project is now eol and there is a new one called input-leap. even Synergy doesn't have Wayland figured out. Pretty poor considered the premium they ask. (using X11 atm of cause)
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#1309
No description provided.