* • Create the first unused workspace.
*
*/
-void init_ws_for_output(Output *output, Con *content);
+void init_ws_for_output(Output *output);
/**
* Initializes the specified output, assigning the specified workspace to it.
else
TAILQ_INSERT_TAIL(&outputs, new_output, outputs);
output_init_con(new_output);
- init_ws_for_output(new_output, output_get_content(new_output->con));
+ init_ws_for_output(new_output);
num_screens++;
}
new_output->primary = primary;
* • Create the first unused workspace.
*
*/
-void init_ws_for_output(Output *output, Con *content) {
+void init_ws_for_output(Output *output) {
+ Con *content = output_get_content(output->con);
Con *previous_focus = con_get_workspace(focused);
/* go through all assignments and move the existing workspaces to this output */
if (!TAILQ_EMPTY(&(content->nodes_head)))
continue;
DLOG("Should add ws for output %s\n", output_primary_name(output));
- init_ws_for_output(output, content);
+ init_ws_for_output(output);
}
/* Focus the primary screen, if possible */
static void fallback_to_root_output(void) {
root_output->active = true;
output_init_con(root_output);
- init_ws_for_output(root_output, output_get_content(root_output->con));
+ init_ws_for_output(root_output);
}
/*
else
TAILQ_INSERT_TAIL(&outputs, s, outputs);
output_init_con(s);
- init_ws_for_output(s, output_get_content(s->con));
+ init_ws_for_output(s);
num_screens++;
}
s->active = true;
TAILQ_INSERT_TAIL(&outputs, s, outputs);
output_init_con(s);
- init_ws_for_output(s, output_get_content(s->con));
+ init_ws_for_output(s);
}
/*