wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

configwin.c (490B)


      1 /* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include "../x11.h"
      5 
      6 void
      7 configwin(Window *w, Rectangle r, int border) {
      8 	XWindowChanges wc;
      9 
     10 	if(eqrect(r, w->r) && border == w->border)
     11 		return;
     12 
     13 	wc.x = r.min.x - border;
     14 	wc.y = r.min.y - border;
     15 	wc.width = Dx(r);
     16 	wc.height = Dy(r);
     17 	wc.border_width = border;
     18 	XConfigureWindow(display, w->xid, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
     19 
     20 	w->r = r;
     21 	w->border = border;
     22 }