diff options
Diffstat (limited to '')
| -rw-r--r-- | dwm.c | 21 |
1 files changed, 11 insertions, 10 deletions
| @@ -61,6 +61,7 @@ enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */ | |||
| 61 | 61 | ||
| 62 | /* typedefs */ | 62 | /* typedefs */ |
| 63 | typedef unsigned int uint; | 63 | typedef unsigned int uint; |
| 64 | typedef unsigned long ulong; | ||
| 64 | typedef struct Client Client; | 65 | typedef struct Client Client; |
| 65 | struct Client { | 66 | struct Client { |
| 66 | char name[256]; | 67 | char name[256]; |
| @@ -79,8 +80,8 @@ struct Client { | |||
| 79 | 80 | ||
| 80 | typedef struct { | 81 | typedef struct { |
| 81 | int x, y, w, h; | 82 | int x, y, w, h; |
| 82 | unsigned long norm[ColLast]; | 83 | ulong norm[ColLast]; |
| 83 | unsigned long sel[ColLast]; | 84 | ulong sel[ColLast]; |
| 84 | Drawable drawable; | 85 | Drawable drawable; |
| 85 | GC gc; | 86 | GC gc; |
| 86 | struct { | 87 | struct { |
| @@ -93,7 +94,7 @@ typedef struct { | |||
| 93 | } DC; /* draw context */ | 94 | } DC; /* draw context */ |
| 94 | 95 | ||
| 95 | typedef struct { | 96 | typedef struct { |
| 96 | unsigned long mod; | 97 | ulong mod; |
| 97 | KeySym keysym; | 98 | KeySym keysym; |
| 98 | void (*func)(const void *arg); | 99 | void (*func)(const void *arg); |
| 99 | const void *arg; | 100 | const void *arg; |
| @@ -129,8 +130,8 @@ void destroynotify(XEvent *e); | |||
| 129 | void detach(Client *c); | 130 | void detach(Client *c); |
| 130 | void detachstack(Client *c); | 131 | void detachstack(Client *c); |
| 131 | void drawbar(void); | 132 | void drawbar(void); |
| 132 | void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]); | 133 | void drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]); |
| 133 | void drawtext(const char *text, unsigned long col[ColLast], Bool invert); | 134 | void drawtext(const char *text, ulong col[ColLast], Bool invert); |
| 134 | void *emallocz(uint size); | 135 | void *emallocz(uint size); |
| 135 | void enternotify(XEvent *e); | 136 | void enternotify(XEvent *e); |
| 136 | void eprint(const char *errstr, ...); | 137 | void eprint(const char *errstr, ...); |
| @@ -140,7 +141,7 @@ void focusin(XEvent *e); | |||
| 140 | void focusnext(const void *arg); | 141 | void focusnext(const void *arg); |
| 141 | void focusprev(const void *arg); | 142 | void focusprev(const void *arg); |
| 142 | Client *getclient(Window w); | 143 | Client *getclient(Window w); |
| 143 | unsigned long getcolor(const char *colstr); | 144 | ulong getcolor(const char *colstr); |
| 144 | long getstate(Window w); | 145 | long getstate(Window w); |
| 145 | Bool gettextprop(Window w, Atom atom, char *text, uint size); | 146 | Bool gettextprop(Window w, Atom atom, char *text, uint size); |
| 146 | void grabbuttons(Client *c, Bool focused); | 147 | void grabbuttons(Client *c, Bool focused); |
| @@ -539,7 +540,7 @@ drawbar(void) { | |||
| 539 | } | 540 | } |
| 540 | 541 | ||
| 541 | void | 542 | void |
| 542 | drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]) { | 543 | drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]) { |
| 543 | int x; | 544 | int x; |
| 544 | XGCValues gcv; | 545 | XGCValues gcv; |
| 545 | XRectangle r = { dc.x, dc.y, dc.w, dc.h }; | 546 | XRectangle r = { dc.x, dc.y, dc.w, dc.h }; |
| @@ -560,7 +561,7 @@ drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]) { | |||
| 560 | } | 561 | } |
| 561 | 562 | ||
| 562 | void | 563 | void |
| 563 | drawtext(const char *text, unsigned long col[ColLast], Bool invert) { | 564 | drawtext(const char *text, ulong col[ColLast], Bool invert) { |
| 564 | int x, y, w, h; | 565 | int x, y, w, h; |
| 565 | uint len, olen; | 566 | uint len, olen; |
| 566 | XRectangle r = { dc.x, dc.y, dc.w, dc.h }; | 567 | XRectangle r = { dc.x, dc.y, dc.w, dc.h }; |
| @@ -707,7 +708,7 @@ getclient(Window w) { | |||
| 707 | return c; | 708 | return c; |
| 708 | } | 709 | } |
| 709 | 710 | ||
| 710 | unsigned long | 711 | ulong |
| 711 | getcolor(const char *colstr) { | 712 | getcolor(const char *colstr) { |
| 712 | Colormap cmap = DefaultColormap(dpy, screen); | 713 | Colormap cmap = DefaultColormap(dpy, screen); |
| 713 | XColor color; | 714 | XColor color; |
| @@ -722,7 +723,7 @@ getstate(Window w) { | |||
| 722 | int format, status; | 723 | int format, status; |
| 723 | long result = -1; | 724 | long result = -1; |
| 724 | unsigned char *p = NULL; | 725 | unsigned char *p = NULL; |
| 725 | unsigned long n, extra; | 726 | ulong n, extra; |
| 726 | Atom real; | 727 | Atom real; |
| 727 | 728 | ||
| 728 | status = XGetWindowProperty(dpy, w, wmatom[WMState], 0L, 2L, False, wmatom[WMState], | 729 | status = XGetWindowProperty(dpy, w, wmatom[WMState], 0L, 2L, False, wmatom[WMState], |
