diff options
author | tcmal <me@aria.rip> | 2024-06-21 20:57:25 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-06-21 20:57:25 +0100 |
commit | 3bff6a4dd8c16e9d633bd0dc4d42c1b89e748c0f (patch) | |
tree | bcf56cac185cc524b9be360c251e88f2523f9932 /src | |
parent | e38b963fa4cf6a8bb1341ba5437f8ed9ebe70730 (diff) |
fix client state geometry not getting updated on startup
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 5 insertions, 2 deletions
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<Self> { - 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<()> { |