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

Allow applications to capture mouse pointer #69

Open
fbushstone opened this issue Dec 27, 2020 · 7 comments
Open

Allow applications to capture mouse pointer #69

fbushstone opened this issue Dec 27, 2020 · 7 comments

Comments

@fbushstone
Copy link

This is mostly a gaming-related issue; a lot of games expect to have control over the mouse pointer. For example, Velox does not allow Minecraft to capture the mouse pointer which in turn makes turning the camera nearly impossible.

@michaelforney
Copy link
Owner

I assume this is done with some protocol extension that swc does not implement. Maybe something in wayland-protocols? You could try to implement it in swc if it's simple enough.

@fbushstone
Copy link
Author

Sure, I could try my hand at this.

@fbushstone
Copy link
Author

fbushstone commented Dec 31, 2020

After looking through the protocols and the libswc code, I've come to the conclusion that mouse pointer capture is something that needs either the relative pointer protocol, the pointer constraint protocol, or both.
libswc seems to already have implemented something related to relative pointers (https://github.com/michaelforney/swc/blob/master/libswc/pointer.c#L425) but I'm not sure if this is what xwayland expects. I also haven't found much information on whether the pointer constraints protocol is needed.

Relevant protocols: https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml and https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/relative-pointer/relative-pointer-unstable-v1.xml

@fbushstone fbushstone reopened this Dec 31, 2020
@fbushstone
Copy link
Author

It looks like swc supports these operations through pointer_set_region and pointer_hadnle_relative_motion. I assume I may have to hack around with seats but I don't know.

@michaelforney michaelforney transferred this issue from michaelforney/velox Mar 15, 2021
@Libreh
Copy link

Libreh commented May 1, 2023

Any progress on this?

@Libreh
Copy link

Libreh commented Jun 9, 2023

This along with subsurface support are the only 2 things that stop me from daily driving velox with swc, I'd love to have these implemented, is there any way I can help or contribute?

@ErnestNoga
Copy link

Hey, is this ever going to be done? This is also stopping me from daily driving velox and I don't have enough skill in C to help out, myself.

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

4 participants