Made new windows spawn in center

pull/4/head
E. Almqvist 4 years ago
parent 69539fa30f
commit 7a874be1c6
  1. 4
      src/dwm.c

@ -1132,6 +1132,10 @@ manage(Window w, XWindowAttributes *wa)
c->bw = borderpx;
wc.border_width = c->bw;
if(c->x == selmon->wx) c->x += (c->mon->ww - WIDTH(c)) / 2 - c->bw;
if(c->y == selmon->wy) c->y += (c->mon->wh - HEIGHT(c)) / 2 - c->bw;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
configure(c); /* propagates border_width, if size doesn't change */

Loading…
Cancel
Save