On Wayland, make the CSD frame double click reliable

It was discovered that on GNOME the click sometimes being swallowed
by the mutter's `wl_pointer::enter/leave` sequences. This was happening
due to `xdg_toplevel::move` making the pointer to leave the surface.

To make handling of that more robust, we could start the
`xdg_toplevel::move` when the actual pointer motion is being performed.

Links: https://github.com/alacritty/alacritty/issues/7011
Links: https://gitlab.gnome.org/GNOME/mutter/-/issues/2669#note_1790825
This commit is contained in:
Kirill Chibisov 2023-07-15 08:09:28 +00:00 committed by GitHub
parent 97434d8d80
commit b166e1ff13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 4 deletions

View file

@ -68,7 +68,7 @@ impl PointerHandler for WinitState {
if parent_surface != surface =>
{
if let Some(icon) =
window.frame_point_moved(surface, event.position.0, event.position.1)
window.frame_point_moved(seat, surface, event.position.0, event.position.1)
{
if let Some(pointer) = seat_state.pointer.as_ref() {
let surface = pointer