wlroots
wlroots copied to clipboard
Make grabs more useful
Grabs are currently used only for drag-and-drop. They could be useful to a lot more things:
- Pointer constraints (https://github.com/swaywm/wlroots/issues/1501)
- Move/resize windows (those would be grab interfaces implemented in the compositor)
- Button grabs (while pressing a button, focus is locked)
Maybe current grab APIs could be extended for some of these use-cases. Maybe we need to introduce cursor grabs.
wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1506
I do not think extending pointer grabs is doable easily. wlr_seat and wlr_cursor are fundamentally unrelated. However, making cursor grabs may entail much of the same work as just extending pointer grabs.
I thought about something: You can't have multiple pointer grabs, so if we just extended pointer grabs, then you wouldn't be able to have a constraint active while you have another grab active, which would be pretty unfortunate.
I do not think extending pointer grabs is doable easily.
Depends the use-case. Button grabs would be pointer grabs, not cursor grabs.