Skip to content

Commit

Permalink
#176 global space settings should apply properly during startup
Browse files Browse the repository at this point in the history
  • Loading branch information
koekeishiya committed Jul 30, 2019
1 parent 2908ea0 commit 77141ac
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Warping a window should respect insert direction in scenarios where the default warp is equal to a swap operation [#146](https://github.com/koekeishiya/yabai/issues/146)
- Exiting mission-control will invalidate the region assigned to Spaces/Views as because a Space may have been dragged to a different monitor [#](https://github.com/koekeishiya/yabai/issues/118)
- Application_Launched signal incorrectly fired multiple times due to accessibility retries [#175](https://github.com/koekeishiya/yabai/issues/175)
- Global space settings should properly apply again [#176](https://github.com/koekeishiya/yabai/issues/176)

## [1.1.2] - 2019-07-15
### Changed
Expand Down
19 changes: 19 additions & 0 deletions src/space_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,25 @@ void space_manager_init(struct space_manager *sm)
sm->window_placement = CHILD_SECOND;

table_init(&sm->view, 23, hash_view, compare_view);

uint32_t display_count;
uint32_t *display_list = display_manager_active_display_list(&display_count);
if (!display_list) return;

for (int i = 0; i < display_count; ++i) {
int space_count;
uint64_t *space_list = display_space_list(display_list[i], &space_count);
if (!space_list) continue;

for (int j = 0; j < space_count; ++j) {
struct view *view = view_create(space_list[j]);
table_add(&sm->view, &space_list[j], view);
}

free(space_list);
}

free(display_list);
}

void space_manager_begin(struct space_manager *sm)
Expand Down
2 changes: 1 addition & 1 deletion src/yabai.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ int main(int argc, char **argv)

process_manager_init(&g_process_manager);
workspace_event_handler_init(&g_workspace_context);
space_manager_init(&g_space_manager);
window_manager_init(&g_window_manager);
space_manager_init(&g_space_manager);
mouse_state_init(&g_mouse_state);
SLSRegisterConnectionNotifyProc(g_connection, connection_handler, 1204, NULL);

Expand Down

0 comments on commit 77141ac

Please sign in to comment.