wlroots icon indicating copy to clipboard operation
wlroots copied to clipboard

Make grabs more useful

Open emersion opened this issue 6 years ago • 3 comments

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

emersion avatar Jan 26 '19 13:01 emersion

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.

L-as avatar Jan 26 '19 13:01 L-as

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.

L-as avatar Jan 26 '19 18:01 L-as

I do not think extending pointer grabs is doable easily.

Depends the use-case. Button grabs would be pointer grabs, not cursor grabs.

emersion avatar Jan 28 '19 13:01 emersion