]> git.sur5r.net Git - i3/i3/blobdiff - src/tree.c
resize/unmap container x11 windows on demand (makes background images visible again)
[i3/i3] / src / tree.c
index 244b5ba9bd7b54f61c4639aec8ff4748fafa6956..696f77ccebf31b4f28ecf474f4fb06876626d9a8 100644 (file)
@@ -70,11 +70,21 @@ void tree_init() {
         oc->type = CT_OUTPUT;
         oc->rect = output->rect;
 
+        char *name;
+        asprintf(&name, "[i3 con] output %s", oc->name);
+        x_set_name(oc, name);
+        free(name);
+
         /* add a workspace to this output */
         ws = con_new(oc);
         ws->type = CT_WORKSPACE;
         asprintf(&(ws->name), "%d", c);
         c++;
+
+        asprintf(&name, "[i3 con] workspace %s", ws->name);
+        x_set_name(ws, name);
+        free(name);
+
         ws->fullscreen_mode = CF_OUTPUT;
         ws->orientation = HORIZ;
     }
@@ -233,7 +243,7 @@ void tree_split(Con *con, orientation_t orientation) {
     /* if we are in a container whose parent contains only one
      * child and has the same orientation like we are trying to
      * set, this operation is a no-op to not confuse the user */
-    if (parent->orientation == orientation &&
+    if (con_orientation(parent) == orientation &&
         TAILQ_NEXT(con, nodes) == TAILQ_END(&(parent->nodes_head))) {
         DLOG("Not splitting the same way again\n");
         return;
@@ -353,6 +363,7 @@ void tree_next(char way, orientation_t orientation) {
     while (!TAILQ_EMPTY(&(next->focus_head)))
         next = TAILQ_FIRST(&(next->focus_head));
 
+    DLOG("focusing %p\n", next);
     con_focus(next);
 }