summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxVerevkin <maxxverrr@gmail.com>2022-08-09 22:04:22 +0300
committerMaxVerevkin <maxxverrr@gmail.com>2022-08-09 22:04:22 +0300
commit2a3c0d9ceac54c9f6d9312c610d2a161a4bb37c9 (patch)
treeb27d220361c8a54ef73a30aabe493bdce1dd4111 /src
parent1851c56e407cac72ca104cc5e75692cd9c648986 (diff)
downloadi3bar-mango-2a3c0d9ceac54c9f6d9312c610d2a161a4bb37c9.tar.gz
some renames
Diffstat (limited to 'src')
-rw-r--r--src/bar.rs8
-rw-r--r--src/state.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bar.rs b/src/bar.rs
index f3dc95c..b157190 100644
--- a/src/bar.rs
+++ b/src/bar.rs
@@ -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,