]> git.sur5r.net Git - i3/i3/commitdiff
init_ws_for_output: Remove content argument 3397/head
authorOrestis Floros <orestisf1993@gmail.com>
Wed, 12 Sep 2018 13:53:20 +0000 (16:53 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Wed, 12 Sep 2018 13:53:20 +0000 (16:53 +0300)
include/randr.h
src/fake_outputs.c
src/randr.c
src/xinerama.c

index 39182c54b3e76d0851cebeb7d3ed99f68e4109b3..5c0c8b3d0079181d437b7da1a78c55f91f4cbc7e 100644 (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.
index 39cbd7bbc6e98fead58a72f94074b45f2826a933..5f3622d473c7648fc24e5e6d34e8f62834d2e9ba 100644 (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;
index 7c90f1c0582107e64b125fdaf4294aff0fa0e873..d22726d2cf9d529e19e692062dee7a8519eea5c6 100644 (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);
 }
 
 /*
index d0651a851dadf9acf0787c4502d67564a941b474..4acfd3cb1d7c9b9bc1a0174cbbc8c03786ad3b08 100644 (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);
 }
 
 /*