fix(bar): apply work area offset on monitor reconnect

This commit makes sure the bar applies the the `work_area_offset`
correctly after a monitor reconnects; if it is the first time a monitor
is connecting, the cached offset won't exist yet.
This commit is contained in:
alex-ds13
2025-02-23 22:59:02 +00:00
committed by LGUG2Z
parent f0222dd4ab
commit 990a339d4e

View File

@@ -718,6 +718,12 @@ impl eframe::App for Komobar {
}
}
// Reset the current `work_area_offset` so that it gets recalculated and
// properly applied again, since if the monitor has connected for the first
// time it won't have the work_area_offset applied but the bar thinks it
// does.
self.work_area_offset = komorebi_client::Rect::default();
should_apply_config = true;
}
self.disabled = false;