From d2d6c0de12640ea2a9f69e9a99df9a024d37858f Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 5 Mar 2009 19:47:16 +0100 Subject: [PATCH] Enable switching to containers when the current container has only one client --- src/commands.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands.c b/src/commands.c index 409f2115..675c43e5 100644 --- a/src/commands.c +++ b/src/commands.c @@ -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);