Skip to content

Commit

Permalink
compatibility with 'Displays have separate spaces' turned off (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixKratz committed Aug 5, 2024
1 parent c713afe commit fb59232
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 157 deletions.
7 changes: 7 additions & 0 deletions src/bar_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,13 @@ void bar_manager_handle_space_change(struct bar_manager* bar_manager, bool force
env_vars_destroy(&env_vars);
}

void bar_manager_poll_active_display(struct bar_manager* bar_manager) {
uint32_t aadid = display_active_display_adid();
if (aadid != bar_manager->active_adid) {
bar_manager_handle_display_change(bar_manager);
}
}

void bar_manager_handle_display_change(struct bar_manager* bar_manager) {
bar_manager->active_adid = display_active_display_adid();
struct env_vars env_vars;
Expand Down
1 change: 1 addition & 0 deletions src/bar_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ void bar_manager_display_added(struct bar_manager* bar_manager, uint32_t did);
void bar_manager_refresh(struct bar_manager* bar_manager, bool forced, bool threaded);
void bar_manager_resize(struct bar_manager* bar_manager);

void bar_manager_poll_active_display(struct bar_manager* bar_manager);
void bar_manager_handle_mouse_entered_global(struct bar_manager* bar_manager);
void bar_manager_handle_mouse_exited_global(struct bar_manager* bar_manager);
void bar_manager_handle_mouse_scrolled_global(struct bar_manager* bar_manager, int scroll_delta, uint32_t did, uint32_t modifier);
Expand Down
Loading

0 comments on commit fb59232

Please sign in to comment.