diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2022-08-09 22:04:22 +0300 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2022-08-09 22:04:22 +0300 |
| commit | 2a3c0d9ceac54c9f6d9312c610d2a161a4bb37c9 (patch) | |
| tree | b27d220361c8a54ef73a30aabe493bdce1dd4111 | |
| parent | 1851c56e407cac72ca104cc5e75692cd9c648986 (diff) | |
| download | i3bar-mango-2a3c0d9ceac54c9f6d9312c610d2a161a4bb37c9.tar.gz | |
some renames
| -rw-r--r-- | src/bar.rs | 8 | ||||
| -rw-r--r-- | src/state.rs | 2 |
2 files changed, 5 insertions, 5 deletions
@@ -20,7 +20,7 @@ use crate::{ }; pub struct Bar { - pub first_configure: bool, + pub configured: bool, pub width: u32, pub height: u32, pub scale: i32, @@ -35,12 +35,12 @@ pub struct Bar { impl Bar { pub fn configure(&mut self, ss: &mut SharedState, width: u32) { - if self.width != width { + if self.width != width && width != 0 { self.width = width; self.layer.set_exclusive_zone(self.height as i32); } - self.first_configure = false; + self.configured = true; self.draw(ss); } @@ -84,7 +84,7 @@ impl Bar { } pub fn draw(&mut self, ss: &mut SharedState) { - if self.first_configure { + if !self.configured { return; } diff --git a/src/state.rs b/src/state.rs index ea5ca4e..131e20f 100644 --- a/src/state.rs +++ b/src/state.rs @@ -194,7 +194,7 @@ impl OutputHandler for State { .expect("layer surface creation"); let river_output_status = self.river_status_state.new_output_status(qh, &output).ok(); self.bars.push(Bar { - first_configure: true, + configured: false, width: 0, height, scale: 1, |
