From 2c30ea78630abd060d5e979e9f3d66ee2e14d752 Mon Sep 17 00:00:00 2001 From: Shawn Wallace Date: Tue, 2 Sep 2025 23:08:00 -0400 Subject: [PATCH] xstate: always stack newly mapped windows below I can't figure out a way to actually test this, but this seems to work in manual testing. Fixes #146 --- src/xstate/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xstate/mod.rs b/src/xstate/mod.rs index 92ab897..7b61948 100644 --- a/src/xstate/mod.rs +++ b/src/xstate/mod.rs @@ -380,6 +380,12 @@ impl XState { } xcb::Event::X(x::Event::MapRequest(e)) => { debug!("requested to map {:?}", e.window()); + unwrap_or_skip_bad_window_cont!(self.connection.send_and_check_request( + &x::ConfigureWindow { + window: e.window(), + value_list: &[x::ConfigWindow::StackMode(x::StackMode::Below)] + } + )); unwrap_or_skip_bad_window_cont!(self .connection .send_and_check_request(&x::MapWindow { window: e.window() }));