aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/dwm/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/dwm/dwm.c')
-rw-r--r--sys/cmd/dwm/dwm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/cmd/dwm/dwm.c b/sys/cmd/dwm/dwm.c
index 87613ec..a6d2bd2 100644
--- a/sys/cmd/dwm/dwm.c
+++ b/sys/cmd/dwm/dwm.c
@@ -536,6 +536,14 @@ manage(Window w, XWindowAttributes *wa)
&& (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my);
c->bw = borderpx;
+ selmon->tagset[selmon->seltags] &= ~scratchtag;
+ if(!strcmp(c->name, scratchname)) {
+ c->mon->tagset[c->mon->seltags] |= c->tags = scratchtag;
+ c->isfloating = 1;
+ c->x = c->mon->wx + (c->mon->ww / 2 - WIDTH(c) / 2);
+ c->y = c->mon->wy + (c->mon->wh / 2 - HEIGHT(c) / 2);
+ }
+
wc.border_width = c->bw;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);