shell: implement pointer-constraints-unstable-v1#2357
Open
skygrango wants to merge 4 commits into
Open
Conversation
440115c to
e2e2ca5
Compare
e2e2ca5 to
92ad43e
Compare
fn new_constraint(): check PointerTargetFocus, KeyboardTargetFocus, and Region from constraint are valid before activrating constraints. fn cursor_position_hint(): data saved in the seat and be applied after the constraints are removed fn find_window(): iterate through all windows to find the window size and offset fn apply_cursor_hint(): when unlocked, receive the pointer cursor hint saved from seat and apply it Other: remove constraints when focus changes. sliding confinement: help user to update valid x or y axis when the pointer is confined.
92ad43e to
6bed83b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Needs Smithay/smithay#2027
I did the following:
This protocol feature is a very important to games, especially first-person and third-person games, many games control mouse behavior through pointer-constraints, some professional software also requires this feature, but I don't have any of them to test it.
If there are still issues with camera control with xwayland, then it's probably not a problem with this protocol.
I still recommend using
PROTON_ENABLE_WAYLAND=1whenever possible.the games I have already tested:
With this implementation, games can now be played in window mode, instead of having to be played in fullscreen to avoid pointer escape.
I know this PR is a bit too large, so please let me know if there's anything I need to add.
🍻