mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-10 05:44:16 +00:00
fix regression with space items not being properly redrawn
This commit is contained in:
parent
7835f67c31
commit
07c0c9a0f3
2 changed files with 20 additions and 22 deletions
|
@ -34,7 +34,6 @@ void bar_manager_init(struct bar_manager* bar_manager) {
|
|||
bar_manager->window_level = kCGBackstopMenuLevel;
|
||||
bar_manager->topmost = false;
|
||||
bar_manager->sticky = false;
|
||||
bar_manager->picky_redraw = false;
|
||||
bar_manager->notch_width = 200;
|
||||
bar_manager->notch_offset = 0;
|
||||
bar_manager->active_adid = display_arrangement(display_active_display_id());
|
||||
|
@ -329,26 +328,7 @@ bool bar_manager_bar_needs_redraw(struct bar_manager* bar_manager, struct bar* b
|
|||
|
||||
if (disabled_item_drawn_on_bar) return true;
|
||||
|
||||
if (bar_item->ignore_association
|
||||
|| (bar_item->type == BAR_COMPONENT_SPACE))
|
||||
continue;
|
||||
|
||||
bool drawn_on_non_associated_space = bar_item->associated_space > 0
|
||||
&& !(bar_item->associated_space
|
||||
& (1 << bar->sid))
|
||||
&& ((bar_item->associated_bar << 1)
|
||||
& bar_mask);
|
||||
|
||||
if (drawn_on_non_associated_space) return true;
|
||||
|
||||
bool not_drawn_on_associated_space = draws_item
|
||||
&& bar_item->associated_space > 0
|
||||
&& (bar_item->associated_space
|
||||
& (1 << bar->sid))
|
||||
&& !((bar_item->associated_bar << 1)
|
||||
& bar_mask);
|
||||
|
||||
if (not_drawn_on_associated_space) return true;
|
||||
if (bar_item->ignore_association) continue;
|
||||
|
||||
bool not_drawn_on_associated_display =
|
||||
(draws_item
|
||||
|
@ -374,6 +354,25 @@ bool bar_manager_bar_needs_redraw(struct bar_manager* bar_manager, struct bar* b
|
|||
|
||||
if (drawn_on_non_associated_display) return true;
|
||||
|
||||
if (bar_item->type == BAR_COMPONENT_SPACE) continue;
|
||||
|
||||
bool drawn_on_non_associated_space = bar_item->associated_space > 0
|
||||
&& !(bar_item->associated_space
|
||||
& (1 << bar->sid))
|
||||
&& ((bar_item->associated_bar << 1)
|
||||
& bar_mask);
|
||||
|
||||
if (drawn_on_non_associated_space) return true;
|
||||
|
||||
bool not_drawn_on_associated_space = draws_item
|
||||
&& bar_item->associated_space > 0
|
||||
&& (bar_item->associated_space
|
||||
& (1 << bar->sid))
|
||||
&& !((bar_item->associated_bar << 1)
|
||||
& bar_mask);
|
||||
|
||||
if (not_drawn_on_associated_space) return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ struct bar_manager {
|
|||
bool shadow;
|
||||
bool topmost;
|
||||
bool sticky;
|
||||
bool picky_redraw;
|
||||
bool font_smoothing;
|
||||
bool any_bar_hidden;
|
||||
bool needs_ordering;
|
||||
|
|
Loading…
Reference in a new issue