1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02: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:
SerraPi 2024-05-19 15:35:52 -06:00 committed by GitHub
parent 3b6480f3f2
commit 4ad4b0e070
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -353,7 +353,7 @@ fn load_output_bars(
let index = lock!(map).iter().position(|n| n == monitor_name);
let index = match index {
Some(index) => index - 1,
Some(index) => index,
None => {
lock!(map).push(monitor_name.clone());
lock!(map).len() - 1