Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse input doesn't work inside Xorg/XWayland windows while a Wine/Proton game is paused #1

Open
Zerodya opened this issue Oct 9, 2023 · 1 comment

Comments

@Zerodya
Copy link
Owner

Zerodya commented Oct 9, 2023

This issue happens when pausing a game while the mouse cursor is inside the game window. It's like the mouse cursor gets paused too, and is stuck in that state (Proton games run in XWayland), so it stops working in other XWayland windows too.


This issue is apparently only present when running the script via a keybind.

For some reason running the same script in a terminal (by manually assigning the game process to the PID variable) works as intended and mouse input works correctly in other Xorg/XWayland windows.

Script I ran in terminal which works as intended:

PID=26043 #Manually assign pid of a game
PIDS=$(pstree $PID -npl | grep -oP '(?<=\()[0-9]+(?=\))')

kill -STOP $PIDS

Pausing a game running in gamescope also works as intended.

EDIT

On further analysis it looks like this issue only happens when pausing a game while the mouse cursor is inside the game window.

If I add a sleep timer like this

if [[ "$(ps -o state= $PID)" == S ]]; then
        sleep 3 #timer
        kill -STOP $PIDS
	exit 0
fi

run the script from keybind, and quickly move the mouse cursor out of the game window, the game gets paused after 3 seconds and the mouse works correctly in other XWayland windows.
Not sure how to proceed right now as this should be fixed in a way that still allows pausing the game instantaneously.

@Zerodya
Copy link
Owner Author

Zerodya commented Oct 13, 2023

A new workaround is possible in v0.1.0 since you can now pause a game even if it's not the active window, for example: hyprfreeze -n eldenring.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant