wayfire
wayfire copied to clipboard
Pointer constraints do not warp to cursor hint
Describe the bug On destruction of a pointer constraint, a committed locked pointer constraint should warp the cursor to the set hint. Sway has a good reference implementation of this: https://github.com/swaywm/sway/blob/bbabb9aae8d7b7771d02489b6f20301cf1c090c9/sway/input/cursor.c#L1348
To Reproduce The only program that I use that makes use of this feature is the game Dungeons and Dragons Online, so I will describe the behavior in that context.
- Launch the game
- Press
t
in-game in order to enable camera-follows-cursor. - Move mouse.
Expected behavior A clear and concise description of what you expected to happen. I expected the camera to follow the cursor in the game mentioned above.
Wayfire version 0.8.0
I am willing to provide a PR in the next few weeks, it shouldn't be too hard given that I already know the cause and Sway already has an implementation.
A PR sounds very nice :)
@ammen99 Apologies for the beginner question- how do you get a node/client/view in the Wayfire codebase? My only experience with wlroots comes from dwl.
@fbushstone I am not sure I understand the question. Where to you want to get a node or a view? What is the context, which view do you want to get, etc?
Pointer-constraints are implemented here in wayfire: https://github.com/WayfireWM/wayfire/blob/master/src/view/wlr-surface-pointer-interaction.hpp#L25-L164
Take a look at the implementation, most likely the majority of the functions you need are already there.