Description
Hello together, on wayland I experience a bug where when I change the cursor grab mode it crashes the client.
This can be reproduced by going ingame (e.g. on a LAN server) and then tab out and in again.
It's very likely related to the game ungrabbing the mouse when tabbing in/out:
https://github.com/ddnet/ddnet-rs/blob/ee7e250a57f4262023ad0ce1e45ca2e6286815a3/lib/native/src/native/winit_wrapper.rs#L558-L573
Full code can be found here:
https://github.com/ddnet/ddnet-rs
Debugging output
[1625677.395] {mesa vk display queue} -> wl_surface#27.commit()
[1625677.403] {mesa vk display queue} discarded wl_buffer#178.release()
[1625678.993] wl_pointer#23.enter(32798, wl_surface#27, 1347.05468750, 843.08984375)
[1625679.010] wl_pointer#23.frame()
[1625679.016] zwp_locked_pointer_v1#190.locked()
[1625679.021] zwp_relative_pointer_v1#26.relative_motion(2, 2404437958, -0.80078125, -1.60546875, -1.00000000, -2.00000000)
[1625679.029] wl_pointer#23.frame()
[1625679.033] zwp_relative_pointer_v1#26.relative_motion(2, 2404438960, -1.60546875, -3.21484375, -2.00000000, -4.00000000)
[1625679.040] wl_pointer#23.frame()
[1625679.080] -> wl_pointer#23.set_cursor(32798, nil, 0, 0)
[1625679.093][rs][discarded] -> zwp_confined_pointer_v1@85.destroy()
[1625679.140] -> zwp_pointer_constraints_v1#19.confine_pointer(new id zwp_confined_pointer_v1#85, wl_surface#27, wl_pointer#23, nil, 2)
[1625679.387] {Display Queue} wl_display#1.error(zwp_pointer_constraints_v1#19, 1, "the surface is already constrained")
zwp_pointer_constraints_v1#19: error 1: the surface is already constrained
[2025-01-04T14:40:36Z WARN graphics_backend::backends::vulkan::vulkan] error during swap chain recreation, trying to recover by creating a fake surface: get_physical_device_surface_present_modes failed: ERROR_SURFACE_LOST_KHR
Protocol error 1 on object zwp_pointer_constraints_v1@19:
Protocol error 1 on object zwp_pointer_constraints_v1@19:
Window isn't shown unless you draw
Winit version
0.30.7
Small site note: Multiple users from our community with different window managers experienced it
Description
Hello together, on wayland I experience a bug where when I change the cursor grab mode it crashes the client.
This can be reproduced by going ingame (e.g. on a LAN server) and then tab out and in again.
It's very likely related to the game ungrabbing the mouse when tabbing in/out:
https://github.com/ddnet/ddnet-rs/blob/ee7e250a57f4262023ad0ce1e45ca2e6286815a3/lib/native/src/native/winit_wrapper.rs#L558-L573
Full code can be found here:
https://github.com/ddnet/ddnet-rs
Debugging output
[1625677.395] {mesa vk display queue} -> wl_surface#27.commit() [1625677.403] {mesa vk display queue} discarded wl_buffer#178.release() [1625678.993] wl_pointer#23.enter(32798, wl_surface#27, 1347.05468750, 843.08984375) [1625679.010] wl_pointer#23.frame() [1625679.016] zwp_locked_pointer_v1#190.locked() [1625679.021] zwp_relative_pointer_v1#26.relative_motion(2, 2404437958, -0.80078125, -1.60546875, -1.00000000, -2.00000000) [1625679.029] wl_pointer#23.frame() [1625679.033] zwp_relative_pointer_v1#26.relative_motion(2, 2404438960, -1.60546875, -3.21484375, -2.00000000, -4.00000000) [1625679.040] wl_pointer#23.frame() [1625679.080] -> wl_pointer#23.set_cursor(32798, nil, 0, 0) [1625679.093][rs][discarded] -> zwp_confined_pointer_v1@85.destroy() [1625679.140] -> zwp_pointer_constraints_v1#19.confine_pointer(new id zwp_confined_pointer_v1#85, wl_surface#27, wl_pointer#23, nil, 2) [1625679.387] {Display Queue} wl_display#1.error(zwp_pointer_constraints_v1#19, 1, "the surface is already constrained") zwp_pointer_constraints_v1#19: error 1: the surface is already constrained [2025-01-04T14:40:36Z WARN graphics_backend::backends::vulkan::vulkan] error during swap chain recreation, trying to recover by creating a fake surface: get_physical_device_surface_present_modes failed: ERROR_SURFACE_LOST_KHR Protocol error 1 on object zwp_pointer_constraints_v1@19: Protocol error 1 on object zwp_pointer_constraints_v1@19:Window isn't shown unless you draw
Winit version
0.30.7
Small site note: Multiple users from our community with different window managers experienced it