summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index 5053619..281fa61 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1924,9 +1924,17 @@ tag(const Arg *arg)
void
tagmon(const Arg *arg)
{
- if (!selmon->sel || !mons->next)
+ Client *c = selmon->sel;
+ if (!c || !mons->next)
return;
- sendmon(selmon->sel, dirtomon(arg->i));
+ if (c->isfullscreen) {
+ c->isfullscreen = 0;
+ sendmon(c, dirtomon(arg->i));
+ c->isfullscreen = 1;
+ resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
+ XRaiseWindow(dpy, c->win);
+ } else
+ sendmon(c, dirtomon(arg->i));
}
void