Skip to content

Commit

Permalink
fix(borders): permit failure on global destruction
Browse files Browse the repository at this point in the history
This commit allows calls to Border::destroy to fail when called in the
context of border_manager::destroy_all_borders. This is important in the
context of the retile command, which calls this function, to not leave
the retile in an inconsistent state.
  • Loading branch information
LGUG2Z committed Nov 1, 2024
1 parent 7200895 commit 3a6ae01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions komorebi/src/border_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub fn destroy_all_borders() -> color_eyre::Result<()> {
);

for (_, border) in borders.iter() {
border.destroy()?;
let _ = border.destroy();
}

borders.clear();
Expand All @@ -107,7 +107,7 @@ pub fn destroy_all_borders() -> color_eyre::Result<()> {
tracing::info!("purging unknown borders: {:?}", remaining_hwnds);

for hwnd in remaining_hwnds {
Border::from(hwnd).destroy()?;
let _ = Border::from(hwnd).destroy();
}
}

Expand Down

0 comments on commit 3a6ae01

Please sign in to comment.