diff options
| -rw-r--r-- | Makefile | 12 | ||||
| -rw-r--r-- | monsterwm.c | 6 |
2 files changed, 6 insertions, 12 deletions
@@ -13,11 +13,6 @@ X11LIB = -L/usr/X11R6/lib -lX11 INCS = -I. -I/usr/include ${X11INC} LIBS = -L/usr/lib -lc ${X11LIB} -OPTFLAGS = -s -Os -LDOPTFLAGS = -s -DBGFLAGS = -g -O0 -LDDBGFLAGS = -g - CFLAGS = -std=c99 -pedantic -Wall -Wextra ${INCS} -DVERSION=\"${VERSION}\" LDFLAGS = ${LIBS} @@ -27,12 +22,11 @@ EXEC = ${WMNAME} SRC = ${WMNAME}.c OBJ = ${SRC:.c=.o} -all: CFLAGS += ${OPTFLAGS} -all: LDFLAGS += ${LDOPTFLAGS} +all: CFLAGS += -Os +all: LDFLAGS += -s all: options ${WMNAME} -debug: CFLAGS += ${DBGFLAGS} -debug: LDFLAGS += ${LDDBGFLAGS} +debug: CFLAGS += -O0 -g debug: options ${WMNAME} options: diff --git a/monsterwm.c b/monsterwm.c index 61ac75f..b6d71de 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -575,7 +575,7 @@ unsigned long getcolor(const char* color, const int screen) { void grabbuttons(Client *c) { unsigned int b, m, modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask }; - if (CLICK_TO_FOCUS) for (m = 0; m < LENGTH(modifiers); m++) + for (m = 0; CLICK_TO_FOCUS && m < LENGTH(modifiers); m++) if (c != desktops[currdeskidx].curr) XGrabButton(dis, Button1, modifiers[m], c->win, False, BUTTONMASK, GrabModeAsync, GrabModeAsync, None, None); else XUngrabButton(dis, Button1, modifiers[m], c->win); @@ -665,8 +665,8 @@ void maprequest(XEvent *e) { Desktop *d = NULL; Client *c = NULL; Window w = e->xmaprequest.window; - XWindowAttributes wa = {0}; - XClassHint ch = {0}; + XWindowAttributes wa = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + XClassHint ch = {0, 0}; Bool follow = False, floating = False; int newdsk = currdeskidx; |
