mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-11-20 15:31:54 +01:00
fix(ipc): regression - reload not working due to #592
let index = match index {
Some(index) => index - 1,
None => {
lock!(map).push(monitor_name.clone());
lock!(map).len() - 1
}
};
//This causes index to underflow
//Expected Output is something like 0, 1, etc
//But sometimes we go back around to 18446744073709551615
//Removing the -1 here seems to work ok with multi monitor, and reload is not broken anymore
Some(index) => index,
This commit is contained in:
parent
3b6480f3f2
commit
4ad4b0e070
1 changed files with 1 additions and 1 deletions
|
|
@ -353,7 +353,7 @@ fn load_output_bars(
|
||||||
|
|
||||||
let index = lock!(map).iter().position(|n| n == monitor_name);
|
let index = lock!(map).iter().position(|n| n == monitor_name);
|
||||||
let index = match index {
|
let index = match index {
|
||||||
Some(index) => index - 1,
|
Some(index) => index,
|
||||||
None => {
|
None => {
|
||||||
lock!(map).push(monitor_name.clone());
|
lock!(map).push(monitor_name.clone());
|
||||||
lock!(map).len() - 1
|
lock!(map).len() - 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue