Con *ws = create_workspace_on_output(output, content);
/* TODO: Set focus in main.c */
- con_activate(ws);
+ con_focus(ws);
}
/*
}
/* If default_orientation is NO_ORIENTATION, we change the orientation of
- * the workspaces and their childs depending on output resolution. This is
+ * the workspaces and their children depending on output resolution. This is
* only done for workspaces with maximum one child. */
if (config.default_orientation == NO_ORIENTATION) {
TAILQ_FOREACH(workspace, &(content->nodes_head), nodes) {
continue;
DLOG("Focusing primary output %s\n", output_primary_name(output));
- con_activate(con_descend_focused(output->con));
+ Con *content = output_get_content(output->con);
+ Con *ws = TAILQ_FIRST(&(content)->focus_head);
+ workspace_show(ws);
}
/* render_layout flushes */
if (current != next && TAILQ_EMPTY(&(current->focus_head))) {
/* the workspace is empty and not focused, get rid of it */
DLOG("Getting rid of current = %p / %s (empty, unfocused)\n", current, current->name);
- tree_close_internal(current, DONT_KILL_WINDOW, false, false);
+ tree_close_internal(current, DONT_KILL_WINDOW, false);
continue;
}
DLOG("Detaching current = %p / %s\n", current, current->name);
Con *con = output->con;
/* clear the pointer before calling tree_close_internal in which the memory is freed */
output->con = NULL;
- tree_close_internal(con, DONT_KILL_WINDOW, true, false);
+ tree_close_internal(con, DONT_KILL_WINDOW, true);
DLOG("Done. Should be fine now\n");
}