Bugfix: Don’t crash when we’re already in stacking mode and go into stacking

This commit is contained in:
Michael Stapelberg 2009-03-02 03:33:29 +01:00
parent ac6567c0a6
commit be21e784d9
1 changed files with 4 additions and 0 deletions

View File

@ -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) { void switch_layout_mode(xcb_connection_t *conn, Container *container, int mode) {
if (mode == MODE_STACK) { if (mode == MODE_STACK) {
/* When were 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 /* 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 dont bother here with title bars of the clients, it has height 1 because we dont bother here with
calculating the correct height - it will be adjusted when rendering anyways. */ calculating the correct height - it will be adjusted when rendering anyways. */