From 21136d2647d5537835677142dc8151f199c07d89 Mon Sep 17 00:00:00 2001 From: Timmy Xiao <34635512+tzx@users.noreply.github.com> Date: Mon, 8 Jan 2024 01:55:55 -0500 Subject: [PATCH] Fix delegate dispatch for SurfaceUserData Without this change, the event dispatch would go on forever and cause a stack overflow --- window/src/os/wayland/connection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/window/src/os/wayland/connection.rs b/window/src/os/wayland/connection.rs index 6a684be9e..768da6428 100644 --- a/window/src/os/wayland/connection.rs +++ b/window/src/os/wayland/connection.rs @@ -373,7 +373,7 @@ impl ConnectionOps for WaylandConnection { // Undocumented in sctk 0.17: This is required to use have user data with a surface // Will be just delegate_compositor!(WaylandState, surface: [SurfaceData, SurfaceUserData]) in 0.18 -wayland_client::delegate_dispatch!(WaylandState: [ WlSurface: SurfaceUserData] => WaylandState); +wayland_client::delegate_dispatch!(WaylandState: [ WlSurface: SurfaceUserData] => CompositorState); delegate_compositor!(WaylandState); delegate_output!(WaylandState);