From 6c90b65eb5226596bc6d7fb7d19ff64066083829 Mon Sep 17 00:00:00 2001 From: laycookie Date: Wed, 28 Aug 2024 13:51:08 -0700 Subject: [PATCH 1/2] Add new CompositorHandler events to wgpu example --- Cargo.toml | 2 +- examples/wgpu.rs | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b46aa56dd..f62233d6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ log = "0.4" memmap2 = "0.9.0" rustix = { version = "0.38.15", features = ["fs", "pipe", "shm"] } thiserror = "1.0.30" -wayland-backend = "0.3.0" +wayland-backend = { version = "0.3.0", features = ["client_system"] } wayland-client = "0.31.1" wayland-cursor = "0.31.0" wayland-protocols = { version = "0.32.1", features = ["client", "staging", "unstable"] } diff --git a/examples/wgpu.rs b/examples/wgpu.rs index ee22ee964..a583f6c64 100644 --- a/examples/wgpu.rs +++ b/examples/wgpu.rs @@ -153,6 +153,26 @@ impl CompositorHandler for Wgpu { _time: u32, ) { } + + fn surface_enter( + &mut self, + _conn: &Connection, + _qh: &QueueHandle, + _surface: &wl_surface::WlSurface, + _output: &wl_output::WlOutput, + ) { + // Not needed for this example. + } + + fn surface_leave( + &mut self, + _conn: &Connection, + _qh: &QueueHandle, + _surface: &wl_surface::WlSurface, + _output: &wl_output::WlOutput, + ) { + // Not needed for this example. + } } impl OutputHandler for Wgpu { From 99bb62fdb732bc5afdf696a7f44f1e5d892644fc Mon Sep 17 00:00:00 2001 From: laycookie Date: Wed, 28 Aug 2024 14:19:34 -0700 Subject: [PATCH 2/2] remove temperary cargo item --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f62233d6b..b46aa56dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ log = "0.4" memmap2 = "0.9.0" rustix = { version = "0.38.15", features = ["fs", "pipe", "shm"] } thiserror = "1.0.30" -wayland-backend = { version = "0.3.0", features = ["client_system"] } +wayland-backend = "0.3.0" wayland-client = "0.31.1" wayland-cursor = "0.31.0" wayland-protocols = { version = "0.32.1", features = ["client", "staging", "unstable"] }