forked from ValveSoftware/steamos-compositor
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Pointer and cursor improvements #28
Merged
Merged
Conversation
This file contains 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
Many code editiors remove trailing whitespace automatically making patches difficult since often unrelated lines get changed with the same commit. So remove the whitespace in the steamcompmgr file all at once in this separate commit.
Puts all cursor relevant code into a single class. Preparation for getting cursor movement directly through libinput.
Instead of going through the X11 connection just set the pointer position directly via global variable.
For now only available on drm backend. For nested there is currently a different workaround active making it work. Closes ValveSoftware#19
In nested mode we can use the same code path as in drm mode now.
With cursor position going through global variables we do not need to query the global position anymore. Remove the MouseCursor function for that. Furtheron the relative position getter is also not necessary, but let's remove this one in a separate commit. This commit also adds a debug line for debugging flaky focus changing.
It is enough to get the global cursor location when repainting it. So we do not need to query the relative position. If later on we find this is not right we should be still able to get the relative position from the surface position instead of calling into XWayland. Also it is not expected and apparently unnecessary to move the cursor in the paint function. Therefore remove this call too.
valentindavid
added a commit
to valentindavid/gamescope
that referenced
this pull request
Sep 14, 2021
This is a rebase and simplication of @subdiff's merge request ValveSoftware#28 that was reverted. This fixes ValveSoftware#19 "Mouse input in embedded doesn't work when grabbed". I have tested this commit for some weeks now. I can play FPS games (like Goat Simulator) with a mouse&keyboard. I can still play games without grab like Factorio, with mouse, but also with a controller (I used the Steam Controller to test). The original branch broke some mouse games with game controllers. See
valentindavid
added a commit
to valentindavid/gamescope
that referenced
this pull request
Sep 29, 2021
This is a rebase and simplication of @subdiff's merge request ValveSoftware#28 that was reverted. This fixes ValveSoftware#19 "Mouse input in embedded doesn't work when grabbed". I have tested this commit for some weeks now. I can play FPS games (like Goat Simulator) with a mouse&keyboard. I can still play games without grab like Factorio, with mouse, but also with a controller (I used the Steam Controller to test). The original branch broke some mouse games with game controllers. See
KyunLFA
added a commit
to KyunLFA/gamescope
that referenced
this pull request
Apr 6, 2024
This adds back the pointer constraints support previously in Gamescope, though it may be prove to be useless for this useccase with further testing Note that this is not my work, I just picked some code from @romangg (ValveSoftware#28) !! Full kudos him.
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.
The long-term goal is to make cursor painting independent of X11 protocol.
Larger objectives here:
Note: To get it to build I needed to add the protocol directory to wlroots top-level meson.build file. I.e.:
wlr_inc = include_directories('.', 'include', 'protocol')
. Otherwise the pointer-constraints-unstable-v1-protocol.h header file is not found. That probably comes from the static linkage.