]> git.sur5r.net Git - i3/i3/blobdiff - src/xinerama.c
init_ws_for_output: Remove content argument
[i3/i3] / src / xinerama.c
index fb3b8603b768561e9a0fcdae6d8736c24c6868a1..4acfd3cb1d7c9b9bc1a0174cbbc8c03786ad3b08 100644 (file)
@@ -1,5 +1,3 @@
-#undef I3__FILE__
-#define I3__FILE__ "xinerama.c"
 /*
  * vim:ts=4:sw=4:expandtab
  *
@@ -57,8 +55,11 @@ static void query_screens(xcb_connection_t *conn) {
             s->rect.height = min(s->rect.height, screen_info[screen].height);
         } else {
             s = scalloc(1, sizeof(Output));
-            sasprintf(&(s->name), "xinerama-%d", num_screens);
-            DLOG("Created new Xinerama screen %s (%p)\n", s->name, s);
+            struct output_name *output_name = scalloc(1, sizeof(struct output_name));
+            sasprintf(&output_name->name, "xinerama-%d", num_screens);
+            SLIST_INIT(&s->names_head);
+            SLIST_INSERT_HEAD(&s->names_head, output_name, names);
+            DLOG("Created new Xinerama screen %s (%p)\n", output_primary_name(s), s);
             s->active = true;
             s->rect.x = screen_info[screen].x_org;
             s->rect.y = screen_info[screen].y_org;
@@ -70,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++;
         }
 
@@ -97,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);
 }
 
 /*
@@ -121,14 +122,4 @@ void xinerama_init(void) {
 
         FREE(reply);
     }
-
-#if 0
-    Output *output;
-    Workspace *ws;
-    /* Just go through each active output and associate one workspace */
-    TAILQ_FOREACH(output, &outputs, outputs) {
-        ws = get_first_workspace_for_output(output);
-        initialize_output(conn, output, ws);
-    }
-#endif
 }