Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zwp_pointer_constraints_v1#19: error 1: the surface is already constrained #4073

Open
1 task done
Jupeyy opened this issue Jan 4, 2025 · 0 comments
Open
1 task done
Labels
B - bug Dang, that shouldn't have happened DS - wayland

Comments

@Jupeyy
Copy link

Jupeyy commented Jan 4, 2025

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] -> [email protected]()
[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

  • I understand that windows aren't shown on Wayland unless I draw and present to them.

Winit version

0.30.7

Small site note: Multiple users from our community with different window managers experienced it

@Jupeyy Jupeyy added B - bug Dang, that shouldn't have happened DS - wayland labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - wayland
Development

No branches or pull requests

1 participant