Skip to content

Add unset method to input grab traits#1386

Merged
Drakulix merged 1 commit into
Smithay:masterfrom
ids1024:grab-unset
Apr 12, 2024
Merged

Add unset method to input grab traits#1386
Drakulix merged 1 commit into
Smithay:masterfrom
ids1024:grab-unset

Conversation

@ids1024
Copy link
Copy Markdown
Member

@ids1024 ids1024 commented Apr 12, 2024

PointerGrab::unset is called when a grab is removed or replaced with another grab.

This fixes pop-os/cosmic-comp#403. I've seen issues with one or two of cosmic-comp's grabs if something isn't cleaned up correctly when unset is called, so this should help with them, as well as some other Smithay grabs.

I still need to add this for keyboard and touch grabs, but it seems workable.

@Drakulix
Copy link
Copy Markdown
Member

Seems like a good idea to me!

`unset` is called when a grab is removed with `unset_grab` or replaced
with `set_grab`.

This fixes pop-os/cosmic-comp#403. There are a
couple other grabs in Smithay and cosmic-comp that they run before
unsetting the grab, that may cause issues if the grab is removed without
running it. So this seems useful in general.
@ids1024 ids1024 changed the title Add a PointerGrab::unset method Add unset method to input grab traits Apr 12, 2024
@ids1024 ids1024 marked this pull request as ready for review April 12, 2024 16:55
@Drakulix Drakulix merged commit 033df94 into Smithay:master Apr 12, 2024
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

Successfully merging this pull request may close these issues.

DnD Icons stuck under cursor after DnD is cancelled with the Escape key

2 participants