From: Michael Stapelberg Date: Mon, 2 Mar 2009 02:33:29 +0000 (+0100) Subject: Bugfix: Don’t crash when we’re already in stacking mode and go into stacking X-Git-Tag: 3.a~126 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=be21e784d9ff3c830e169db837671b016c98e28f;p=i3%2Fi3 Bugfix: Don’t crash when we’re already in stacking mode and go into stacking --- 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. */