summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c6
-rw-r--r--config.mk14
-rw-r--r--dwm.h4
-rw-r--r--event.c8
4 files changed, 16 insertions, 16 deletions
diff --git a/client.c b/client.c
index 646bcc1..7bc6772 100644
--- a/client.c
+++ b/client.c
@@ -244,11 +244,11 @@ manage(Window w, XWindowAttributes *wa)
244 c->next = clients; 244 c->next = clients;
245 clients = c; 245 clients = c;
246 246
247 XGrabButton(dpy, Button1, MODKEY, c->win, False, ButtonMask, 247 XGrabButton(dpy, Button1, MODKEY, c->win, False, BUTTONMASK,
248 GrabModeAsync, GrabModeSync, None, None); 248 GrabModeAsync, GrabModeSync, None, None);
249 XGrabButton(dpy, Button2, MODKEY, c->win, False, ButtonMask, 249 XGrabButton(dpy, Button2, MODKEY, c->win, False, BUTTONMASK,
250 GrabModeAsync, GrabModeSync, None, None); 250 GrabModeAsync, GrabModeSync, None, None);
251 XGrabButton(dpy, Button3, MODKEY, c->win, False, ButtonMask, 251 XGrabButton(dpy, Button3, MODKEY, c->win, False, BUTTONMASK,
252 GrabModeAsync, GrabModeSync, None, None); 252 GrabModeAsync, GrabModeSync, None, None);
253 253
254 if(!c->isfloat) 254 if(!c->isfloat)
diff --git a/config.mk b/config.mk
index d65472e..b3c8cf7 100644
--- a/config.mk
+++ b/config.mk
@@ -11,17 +11,17 @@ X11LIB = /usr/X11R6/lib
11INCS = -I/usr/lib -I${X11INC} 11INCS = -I/usr/lib -I${X11INC}
12LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 12LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
13 13
14# dwm version
15VERSION = 0.6
16
17# default config.h
18CONFIG = config.h
19
14# flags 20# flags
15CFLAGS = -O3 ${INCS} -DVERSION=\"${VERSION}\" -DCONFIG=\"${CONFIG}\" 21CFLAGS = -O3 ${INCS} -DVERSION=\"${VERSION}\" -DCONFIG=\"${CONFIG}\"
16LDFLAGS = ${LIBS} 22LDFLAGS = ${LIBS}
17#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" -DCONFIG=\"${CONFIGH}\" 23#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" -DCONFIG=\"${CONFIG}\"
18#LDFLAGS = -g ${LIBS} 24#LDFLAGS = -g ${LIBS}
19 25
20# compiler 26# compiler
21CC = cc 27CC = cc
22
23# dwm version
24VERSION = 0.6
25
26# default config.h
27CONFIG = config.h
diff --git a/dwm.h b/dwm.h
index f7bebb0..f57a8ce 100644
--- a/dwm.h
+++ b/dwm.h
@@ -7,8 +7,8 @@
7#include CONFIG 7#include CONFIG
8 8
9/* mask shorthands, used in event.c and client.c */ 9/* mask shorthands, used in event.c and client.c */
10#define ButtonMask (ButtonPressMask | ButtonReleaseMask) 10#define BUTTONMASK (ButtonPressMask | ButtonReleaseMask)
11#define MouseMask (ButtonMask | PointerMotionMask) 11#define MOUSEMASK (BUTTONMASK | PointerMotionMask)
12 12
13typedef union Arg Arg; 13typedef union Arg Arg;
14typedef struct Client Client; 14typedef struct Client Client;
diff --git a/event.c b/event.c
index 967be91..99216b3 100644
--- a/event.c
+++ b/event.c
@@ -32,12 +32,12 @@ movemouse(Client *c)
32 32
33 ocx = c->x; 33 ocx = c->x;
34 ocy = c->y; 34 ocy = c->y;
35 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync, 35 if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
36 None, cursor[CurMove], CurrentTime) != GrabSuccess) 36 None, cursor[CurMove], CurrentTime) != GrabSuccess)
37 return; 37 return;
38 XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui); 38 XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui);
39 for(;;) { 39 for(;;) {
40 XMaskEvent(dpy, MouseMask | ExposureMask, &ev); 40 XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
41 switch (ev.type) { 41 switch (ev.type) {
42 default: break; 42 default: break;
43 case Expose: 43 case Expose:
@@ -65,12 +65,12 @@ resizemouse(Client *c)
65 65
66 ocx = c->x; 66 ocx = c->x;
67 ocy = c->y; 67 ocy = c->y;
68 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync, 68 if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
69 None, cursor[CurResize], CurrentTime) != GrabSuccess) 69 None, cursor[CurResize], CurrentTime) != GrabSuccess)
70 return; 70 return;
71 XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h); 71 XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h);
72 for(;;) { 72 for(;;) {
73 XMaskEvent(dpy, MouseMask | ExposureMask, &ev); 73 XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
74 switch(ev.type) { 74 switch(ev.type) {
75 default: break; 75 default: break;
76 case Expose: 76 case Expose: