]> git.sur5r.net Git - i3/i3/commitdiff
Enable switching to containers when the current container has only one client
authorMichael Stapelberg <michael+x200@stapelberg.de>
Thu, 5 Mar 2009 18:47:16 +0000 (19:47 +0100)
committerMichael Stapelberg <michael+x200@stapelberg.de>
Thu, 5 Mar 2009 18:47:16 +0000 (19:47 +0100)
src/commands.c

index 409f21152511ba3c6bac345e0efdfb6165e6bb89..675c43e5b511ed671d3555299040927181bc132e 100644 (file)
@@ -41,6 +41,10 @@ static bool focus_window_in_container(xcb_connection_t *conn, Container *contain
                         candidate = CIRCLEQ_FIRST(&(container->clients));
         } else printf("Direction not implemented!\n");
 
+        /* If we could not switch, the container contains exactly one client. We return false */
+        if (candidate == container->currently_focused)
+                return false;
+
         /* Set focus */
         set_focus(conn, candidate);