smithay/smallvil
Ian Douglas Scott eea0d9c171 Call *grab::unset in *set_grab, before restoring focus
This fixes an issue I noticed where cancelled drag-and-drop in clients
like Firefox and Nautilus caused a window to ignore pointer events until
losing and regaining focus. It seems calling the `.ungrab` method at the
end of `with_grab` means calling it after pointer focus is restored, and
clients seem not to handle the `wl_pointer.enter` before the drag is
actually over.

Deferring the focus restoration as well is slightly complicated to
implement, and seems problematic when it involves a serial. Maybe there
shouldn't be any input events after the `*set_grab` call but before
returning, but this seems cleaner.

Taking a reference to the handler in `*InterHandle.*set_grab` is a bit
annoying, but easy enough to deal with, and allows this to work more
cleanly. This seems reasonable as long as we don't have a better
solution to the whole `GrabStatus::Borrowed` thing.
2024-04-16 12:00:38 +02:00
..
src Call *grab::unset in *set_grab, before restoring focus 2024-04-16 12:00:38 +02:00
Cargo.toml Update dependencies 2023-05-14 20:25:33 -07:00