From be21e784d9ff3c830e169db837671b016c98e28f Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 2 Mar 2009 03:33:29 +0100 Subject: [PATCH] =?UTF-8?q?Bugfix:=20Don=E2=80=99t=20crash=20when=20we?= =?UTF-8?q?=E2=80=99re=20already=20in=20stacking=20mode=20and=20go=20into?= =?UTF-8?q?=20stacking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util.c b/src/util.c index c57e4e3b..497474d6 100644 --- a/src/util.c +++ b/src/util.c @@ -165,6 +165,10 @@ void set_focus(xcb_connection_t *conn, Client *client) { */ void switch_layout_mode(xcb_connection_t *conn, Container *container, int mode) { if (mode == MODE_STACK) { + /* When we’re already in stacking mode, nothing has to be done */ + if (container->mode == MODE_STACK) + return; + /* When entering stacking mode, we need to open a window on which we can draw the title bars of the clients, it has height 1 because we don’t bother here with calculating the correct height - it will be adjusted when rendering anyways. */