mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-21 17:09:20 +01:00
For some reason, when calling the `window.set_position` when creating the Komobar or even when applying the config on the first frame the actual EGUI's window size wasn't changing. This commit adds a new field to `Komobar` called `size_rect` so that we can store the expected size rect of the window according to the config, so that we don't have to be calculating it all the time. This field is updated on `apply_config`. Now on `update` of the bar we check if the current size using the EGUI Context is the expected `size_rect`, if it is we do nothing, if it is not we update the bar position. This makes sure that on start the bar will resize to the users config correctly! Now the resize of the bar only happens here. This commit also adds the `hwnd` field to `Komobar` so that we don't have to be calling `process_hwnd()` all the time.