From 3bff6a4dd8c16e9d633bd0dc4d42c1b89e748c0f Mon Sep 17 00:00:00 2001 From: tcmal Date: Fri, 21 Jun 2024 20:57:25 +0100 Subject: fix client state geometry not getting updated on startup --- src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 0232e61..7758cac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,10 +36,13 @@ struct WM<'a> { impl<'a> WM<'a> { pub fn new(conn: &'a RawConnection, screen_num: usize) -> Result { - Ok(Self { + let mut this = Self { conn: Connection::new(conn, screen_num)?, clients: ClientState::default(), - }) + }; + this.clients.update_geometry(&this.conn)?; + + Ok(this) } pub fn event_loop(&mut self) -> Result<()> { -- cgit v1.2.3