From 704ab1904291d79467492e65fd123e3ef04b0b19 Mon Sep 17 00:00:00 2001 From: Ottatop Date: Thu, 13 Jun 2024 17:20:02 -0500 Subject: [PATCH] Send immediate frame when testing It seems wlcs only sends one frame request, so we need to send that frame immediately --- src/handlers.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/handlers.rs b/src/handlers.rs index 488b7e4..a45d074 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -229,6 +229,16 @@ impl CompositorHandler for State { ) }); } + + // It seems wlcs needs immediate frame sends for client tests to work + #[cfg(feature = "testing")] + unmapped_window.send_frame( + &focused_output, + self.pinnacle.clock.now(), + Some(std::time::Duration::ZERO), + |_, _| None, + ); + self.pinnacle.request_layout(&focused_output); } }