all repos — dwm @ 02673538bc98daeb2fe31d3667b5f3e0884e4831

my dwm build

added updatebarpos()
Anselm R Garbe garbeam@gmail.com
Thu, 13 Mar 2008 10:19:05 +0000
commit

02673538bc98daeb2fe31d3667b5f3e0884e4831

parent

95eae7b9d25602cf5fb25ecbc9d92ead8005c1f8

2 files changed, 12 insertions(+), 8 deletions(-)

jump to
M config.anselm.hconfig.anselm.h

@@ -72,10 +72,7 @@ moy = my;

mow = mw; moh = mh; - if(dc.drawable != 0) - XFreePixmap(dpy, dc.drawable); - dc.drawable = XCreatePixmap(dpy, root, bw, bh, DefaultDepth(dpy, screen)); - XMoveResizeWindow(dpy, barwin, bx, by, bw, bh); + updatebarpos(); } void
M dwm.cdwm.c

@@ -178,6 +178,7 @@ void toggleview(const char *arg);

void unban(Client *c); void unmanage(Client *c); void unmapnotify(XEvent *e); +void updatebarpos(void); void updatesizehints(Client *c); void updatetitle(Client *c); void updatewmhints(Client *c);

@@ -1415,10 +1416,7 @@ moy = wy;

mow = ww; moh = wh; - if(dc.drawable != 0) - XFreePixmap(dpy, dc.drawable); - dc.drawable = XCreatePixmap(dpy, root, bw, bh, DefaultDepth(dpy, screen)); - XMoveResizeWindow(dpy, barwin, bx, by, bw, bh); + updatebarpos(); } void

@@ -1740,6 +1738,15 @@ XUnmapEvent *ev = &e->xunmap;

if((c = getclient(ev->window))) unmanage(c); +} + +void +updatebarpos(void) { + + if(dc.drawable != 0) + XFreePixmap(dpy, dc.drawable); + dc.drawable = XCreatePixmap(dpy, root, bw, bh, DefaultDepth(dpy, screen)); + XMoveResizeWindow(dpy, barwin, bx, by, bw, bh); } void