From: Orestis Floros Date: Wed, 12 Sep 2018 13:53:20 +0000 (+0300) Subject: init_ws_for_output: Remove content argument X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F3397%2Fhead;p=i3%2Fi3 init_ws_for_output: Remove content argument --- diff --git a/include/randr.h b/include/randr.h index 39182c54..5c0c8b3d 100644 --- a/include/randr.h +++ b/include/randr.h @@ -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. diff --git a/src/fake_outputs.c b/src/fake_outputs.c index 39cbd7bb..5f3622d4 100644 --- a/src/fake_outputs.c +++ b/src/fake_outputs.c @@ -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; diff --git a/src/randr.c b/src/randr.c index 7c90f1c0..d22726d2 100644 --- a/src/randr.c +++ b/src/randr.c @@ -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); } /* diff --git a/src/xinerama.c b/src/xinerama.c index d0651a85..4acfd3cb 100644 --- a/src/xinerama.c +++ b/src/xinerama.c @@ -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); } /*