winit/wayland: Subsurfaces for drag surfaces

Use `Icon::Surface` instead of `Icon::Buffer`, so we can then create
subsurfaces of the `wl_surface`.

Using `.screenshot()` then copying to an shm buffer is suboptimal, but
this does seem overall better than with the older Iced version when a
drag surface didn't appear until a Vulkan surface could be created for
it.

This re-uses `Connection` in the platform-specific code, instead of
creating from display handle on each call.
This commit is contained in:
Ian Douglas Scott 2024-12-17 15:13:24 -08:00 committed by Ashley Wulber
parent 545ecb8a8a
commit fde0689def
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
6 changed files with 190 additions and 26 deletions

View file

@ -296,6 +296,7 @@ wgpu = { version = "27.0", default-features = false, features = [
"wgsl",
] }
wayland-protocols = { version = "0.32.1", features = ["staging"] }
wayland-client = { version = "0.31.5" }
# web-time = "1.1"