init_ws_for_output: Remove content argument

next
Orestis Floros 2018-09-12 16:53:20 +03:00
parent 5976381012
commit f6bb1e22bb
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
4 changed files with 8 additions and 7 deletions

View File

@ -48,7 +48,7 @@ void output_init_con(Output *output);
* 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.

View File

@ -74,7 +74,7 @@ void fake_outputs_init(const char *output_spec) {
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;

View File

@ -420,7 +420,8 @@ void output_init_con(Output *output) {
* 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 */
@ -908,7 +909,7 @@ void randr_query_outputs(void) {
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 */
@ -1013,7 +1014,7 @@ void randr_disable_output(Output *output) {
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);
}
/*

View File

@ -71,7 +71,7 @@ static void query_screens(xcb_connection_t *conn) {
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++;
}
@ -98,7 +98,7 @@ static void use_root_output(xcb_connection_t *conn) {
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);
}
/*