[portmaster_sway_fullscreen.sh] Explicitly map all input devices to the active game seat #2150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On multi-seat/dual-screen devices (like the AYN Thor), games using Wayland (vs xWayland) lose all input from gptokeyb upon entering fullscreen or during workspace migration.
This happens because the newer sway versions enforce strict seat-ownership. When a window changes state to fullscreen or moves between outputs (DSI-1 to DSI-2), Sway may revoke access to input devices that are not explicitly "trusted" or "attached" to the active seat. Since gptokeyb fake input devices are created dynamically, they land on a default seat that doesn't match the seat where the game window is currently focused.
To resolve this, modify
portmaster_sway_fullscreen.shto perform a "handshake" of input devices the moment a game is launched and fullscreened.seat seat1 attach "*"- This forces all available input devices (physical and virtual) to be attached to the active game seat. This prevents "Focus Revocation," ensuring the game can see the virtual keyboard immediately after the fullscreen transition.seat * keyboard_grouping smart- This unifies the virtual input nodes across all seats. This is critical for dual-screen users; it prevents the game from crashing or losing input when a hotkey is used to swap the game workspace between the top and bottom screens.Test method used below, can be tested without rebuilding rocknix.