update layout function: handle when 0 client on ws

This commit is contained in:
Akos Horvath 2023-03-19 18:31:02 +01:00
parent 491a72d8b6
commit 70dd4aa93d

10
wm.c
View File

@ -199,7 +199,13 @@ void wm_mstack(Wm *wm, Monitor *m)
}
}
//DEBUG_PRINT("mstack cc_sws: %d\n", cc_sws)
DEBUG_PRINT("mstack cc_sws: %d\n", cc_sws)
if (cc_sws <= 0) {
DEBUG_PRINT("mstack cc_sws <= 0, returning\n")
return;
}
// dynamic
if (cc_sws == 1) {
for (c = m->clients; c; c = c->next) {
@ -220,7 +226,7 @@ void wm_mstack(Wm *wm, Monitor *m)
XConfigureWindow(wm->display, c->window, value_mask, &ch);
wm_client_show(wm, c);
//wm_client_focus(c);
wm_client_focus(wm, c);
}
else {
// FIXME not working with dock