diff options
| -rw-r--r-- | monsterwm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/monsterwm.c b/monsterwm.c index 93a2787..f89dbbf 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -285,19 +285,24 @@ void cleanup(void) { */ void client_to_desktop(const Arg *arg) { if (arg->i == current_desktop || !current) return; - Window w = current->win; int cd = current_desktop; + Window w = current->win; + Bool wfloating = current->isfloating; + Bool wfullscrn = current->isfullscrn; + XUnmapWindow(dis, current->win); - if (current->isfullscrn) setfullscreen(current, False); removeclient(current); select_desktop(arg->i); current = addwindow(w); + current->isfloating = wfloating; + current->isfullscrn = wfullscrn; select_desktop(cd); tile(); update_current(current); + if (FOLLOW_WINDOW) change_desktop(arg); desktopinfo(); } |
