dwm.c
changeset 1233 567490f03d8c
parent 1231 36fbfd4d3479
child 1234 ec42705c5fac
equal deleted inserted replaced
1232:7a99ff52436d 1233:567490f03d8c
   130 void detach(Client *c);
   130 void detach(Client *c);
   131 void detachstack(Client *c);
   131 void detachstack(Client *c);
   132 void drawbar(void);
   132 void drawbar(void);
   133 void drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]);
   133 void drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]);
   134 void drawtext(const char *text, ulong col[ColLast], Bool invert);
   134 void drawtext(const char *text, ulong col[ColLast], Bool invert);
   135 void *emallocz(uint size);
       
   136 void enternotify(XEvent *e);
   135 void enternotify(XEvent *e);
   137 void eprint(const char *errstr, ...);
   136 void eprint(const char *errstr, ...);
   138 void expose(XEvent *e);
   137 void expose(XEvent *e);
   139 void focus(Client *c);
   138 void focus(Client *c);
   140 void focusin(XEvent *e);
   139 void focusin(XEvent *e);
   594 		XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
   593 		XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
   595 	else
   594 	else
   596 		XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
   595 		XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
   597 }
   596 }
   598 
   597 
   599 void *
       
   600 emallocz(uint size) {
       
   601 	void *res = calloc(1, size);
       
   602 
       
   603 	if(!res)
       
   604 		eprint("fatal: could not malloc() %u bytes\n", size);
       
   605 	return res;
       
   606 }
       
   607 
       
   608 void
   598 void
   609 enternotify(XEvent *e) {
   599 enternotify(XEvent *e) {
   610 	Client *c;
   600 	Client *c;
   611 	XCrossingEvent *ev = &e->xcrossing;
   601 	XCrossingEvent *ev = &e->xcrossing;
   612 
   602 
   929 	Client *c, *t = NULL;
   919 	Client *c, *t = NULL;
   930 	Status rettrans;
   920 	Status rettrans;
   931 	Window trans;
   921 	Window trans;
   932 	XWindowChanges wc;
   922 	XWindowChanges wc;
   933 
   923 
   934 	c = emallocz(sizeof(Client));
   924 	if(!(c = calloc(1, sizeof(Client))))
       
   925 		eprint("fatal: could not calloc() %u bytes\n", sizeof(Client));
   935 	c->win = w;
   926 	c->win = w;
   936 
   927 
   937 	/* geometry */
   928 	/* geometry */
   938 	c->x = wa->x;
   929 	c->x = wa->x;
   939 	c->y = wa->y;
   930 	c->y = wa->y;