make sticky property a nop on sonoma

This commit is contained in:
Felix Kratz 2023-10-30 21:38:07 +01:00
parent fcdf0a3e96
commit fe2d18970a
2 changed files with 4 additions and 2 deletions

View file

@ -34,7 +34,6 @@ void bar_manager_init(struct bar_manager* bar_manager) {
bar_manager->sleeps = false;
bar_manager->window_level = kCGBackstopMenuLevel;
bar_manager->topmost = false;
bar_manager->sticky = false;
bar_manager->notch_width = 200;
bar_manager->notch_offset = 0;
bar_manager->active_adid = display_arrangement(display_active_display_id());

View file

@ -26,7 +26,10 @@ void window_create(struct window* window, CGRect frame) {
uint64_t set_tags = kCGSExposeFadeTagBit;
uint64_t clear_tags = 0;
if (g_bar_manager.sticky) {
if (__builtin_available(macOS 14.0, *)) {
set_tags |= kCGSStickyTagBit;
clear_tags = kCGSSuperStickyTagBit;
} else if (g_bar_manager.sticky) {
set_tags |= kCGSStickyTagBit;
clear_tags = kCGSSuperStickyTagBit;
}