Browse Source

uppercasing all define'd values (uppercase-prefixed should only be enum field qualifiers)

main
arg@10ksloc.org 18 years ago
parent
commit
77f8c075c4
4 changed files with 16 additions and 16 deletions
  1. +3
    -3
      client.c
  2. +7
    -7
      config.mk
  3. +2
    -2
      dwm.h
  4. +4
    -4
      event.c

+ 3
- 3
client.c View File

@ -244,11 +244,11 @@ manage(Window w, XWindowAttributes *wa)
c->next = clients; c->next = clients;
clients = c; clients = c;
XGrabButton(dpy, Button1, MODKEY, c->win, False, ButtonMask,
XGrabButton(dpy, Button1, MODKEY, c->win, False, BUTTONMASK,
GrabModeAsync, GrabModeSync, None, None); GrabModeAsync, GrabModeSync, None, None);
XGrabButton(dpy, Button2, MODKEY, c->win, False, ButtonMask,
XGrabButton(dpy, Button2, MODKEY, c->win, False, BUTTONMASK,
GrabModeAsync, GrabModeSync, None, None); GrabModeAsync, GrabModeSync, None, None);
XGrabButton(dpy, Button3, MODKEY, c->win, False, ButtonMask,
XGrabButton(dpy, Button3, MODKEY, c->win, False, BUTTONMASK,
GrabModeAsync, GrabModeSync, None, None); GrabModeAsync, GrabModeSync, None, None);
if(!c->isfloat) if(!c->isfloat)


+ 7
- 7
config.mk View File

@ -11,17 +11,17 @@ X11LIB = /usr/X11R6/lib
INCS = -I/usr/lib -I${X11INC} INCS = -I/usr/lib -I${X11INC}
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
# dwm version
VERSION = 0.6
# default config.h
CONFIG = config.h
# flags # flags
CFLAGS = -O3 ${INCS} -DVERSION=\"${VERSION}\" -DCONFIG=\"${CONFIG}\" CFLAGS = -O3 ${INCS} -DVERSION=\"${VERSION}\" -DCONFIG=\"${CONFIG}\"
LDFLAGS = ${LIBS} LDFLAGS = ${LIBS}
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" -DCONFIG=\"${CONFIGH}\"
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" -DCONFIG=\"${CONFIG}\"
#LDFLAGS = -g ${LIBS} #LDFLAGS = -g ${LIBS}
# compiler # compiler
CC = cc CC = cc
# dwm version
VERSION = 0.6
# default config.h
CONFIG = config.h

+ 2
- 2
dwm.h View File

@ -7,8 +7,8 @@
#include CONFIG #include CONFIG
/* mask shorthands, used in event.c and client.c */ /* mask shorthands, used in event.c and client.c */
#define ButtonMask (ButtonPressMask | ButtonReleaseMask)
#define MouseMask (ButtonMask | PointerMotionMask)
#define BUTTONMASK (ButtonPressMask | ButtonReleaseMask)
#define MOUSEMASK (BUTTONMASK | PointerMotionMask)
typedef union Arg Arg; typedef union Arg Arg;
typedef struct Client Client; typedef struct Client Client;


+ 4
- 4
event.c View File

@ -32,12 +32,12 @@ movemouse(Client *c)
ocx = c->x; ocx = c->x;
ocy = c->y; ocy = c->y;
if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
None, cursor[CurMove], CurrentTime) != GrabSuccess) None, cursor[CurMove], CurrentTime) != GrabSuccess)
return; return;
XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui); XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui);
for(;;) { for(;;) {
XMaskEvent(dpy, MouseMask | ExposureMask, &ev);
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
switch (ev.type) { switch (ev.type) {
default: break; default: break;
case Expose: case Expose:
@ -65,12 +65,12 @@ resizemouse(Client *c)
ocx = c->x; ocx = c->x;
ocy = c->y; ocy = c->y;
if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
None, cursor[CurResize], CurrentTime) != GrabSuccess) None, cursor[CurResize], CurrentTime) != GrabSuccess)
return; return;
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h); XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h);
for(;;) { for(;;) {
XMaskEvent(dpy, MouseMask | ExposureMask, &ev);
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
switch(ev.type) { switch(ev.type) {
default: break; default: break;
case Expose: case Expose:


Loading…
Cancel
Save