fix(borders): permit failure on global destruction

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.
This commit is contained in:
LGUG2Z
2024-11-01 11:53:20 -07:00
parent 720089587b
commit 3a6ae01b12

View File

@@ -89,7 +89,7 @@ pub fn destroy_all_borders() -> color_eyre::Result<()> {
);
for (_, border) in borders.iter() {
border.destroy()?;
let _ = border.destroy();
}
borders.clear();
@@ -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();
}
}