From 44cb103c9a7f8eddf7164b3aff5aa3ee8fe958be Mon Sep 17 00:00:00 2001 From: Elinor Berger Date: Sat, 2 Sep 2023 10:46:47 +0200 Subject: [PATCH] backend: fix server-side WAYLAND_DEBUG --- wayland-backend/CHANGELOG.md | 4 ++++ wayland-backend/src/rs/server_impl/client.rs | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/wayland-backend/CHANGELOG.md b/wayland-backend/CHANGELOG.md index 59c182c9f09..e259d8d648f 100644 --- a/wayland-backend/CHANGELOG.md +++ b/wayland-backend/CHANGELOG.md @@ -16,6 +16,10 @@ - Add `flush` method to server `Handle`. +#### Bugfixes + +- Setting `WAYLAND_DEBUG` server-side now properly prints incoming requests + ## 0.2.0 -- 2023-07-13 #### Breaking changes diff --git a/wayland-backend/src/rs/server_impl/client.rs b/wayland-backend/src/rs/server_impl/client.rs index cf972225f57..75114b80589 100644 --- a/wayland-backend/src/rs/server_impl/client.rs +++ b/wayland-backend/src/rs/server_impl/client.rs @@ -363,6 +363,16 @@ impl Client { }; let obj = self.map.find(msg.sender_id).unwrap(); + + if self.debug { + super::super::debug::print_dispatched_message( + obj.interface.name, + msg.sender_id, + obj.interface.requests.get(msg.opcode as usize).unwrap().name, + &msg.args + ); + } + return Ok((msg, obj)); } }