all repos — dwm @ d7cc0f641664a7d5d005d34ccdde50cabf97bd55

my dwm build

applied nsz's style.diff patch
Anselm R Garbe garbeam@gmail.com
Tue, 13 May 2008 14:33:02 +0100
commit

d7cc0f641664a7d5d005d34ccdde50cabf97bd55

parent

6b79f3f3266923292b0ad029c5e240349d9afa39

1 files changed, 13 insertions(+), 14 deletions(-)

jump to
M dwm.cdwm.c

@@ -595,7 +595,7 @@ y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent;

x = dc.x + (h / 2); /* shorten text if necessary */ for(; len && (w = textnw(buf, len)) > dc.w - h; len--); - if (!len) + if(!len) return; if(len < olen) { if(len > 1)

@@ -782,21 +782,21 @@ grabbuttons(Client *c, Bool focused) {

int i, j; unsigned int buttons[] = { Button1, Button2, Button3 }; unsigned int modifiers[] = { MODKEY, MODKEY|LockMask, MODKEY|numlockmask, - MODKEY|numlockmask|LockMask} ; + MODKEY|numlockmask|LockMask} ; XUngrabButton(dpy, AnyButton, AnyModifier, c->win); if(focused) for(i = 0; i < LENGTH(buttons); i++) for(j = 0; j < LENGTH(modifiers); j++) XGrabButton(dpy, buttons[i], modifiers[j], c->win, False, - BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); + BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); else XGrabButton(dpy, AnyButton, AnyModifier, c->win, False, - BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); + BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); } void -grabkeys(void) { +grabkeys(void) { unsigned int i, j; KeyCode code; XModifierKeymap *modmap;

@@ -1041,7 +1041,7 @@ monocle(void) {

Client *c; for(c = clients; c; c = c->next) - if((lt->isfloating || !c->isfloating) && isvisible(c, NULL)) + if((lt->isfloating || !c->isfloating) && isvisible(c, NULL)) resize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw, RESIZEHINTS); }

@@ -1055,7 +1055,7 @@

ocx = nx = c->x; ocy = ny = c->y; if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync, - None, cursor[CurMove], CurrentTime) != GrabSuccess) + None, cursor[CurMove], CurrentTime) != GrabSuccess) return; XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui); for(;;) {

@@ -1221,7 +1221,7 @@

ocx = c->x; ocy = c->y; if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync, - None, cursor[CurResize], CurrentTime) != GrabSuccess) + None, cursor[CurResize], CurrentTime) != GrabSuccess) return; XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1); for(;;) {

@@ -1351,7 +1351,7 @@ wins = NULL;

if(XQueryTree(dpy, root, &d1, &d2, &wins, &num)) { for(i = 0; i < num; i++) { if(!XGetWindowAttributes(dpy, wins[i], &wa) - || wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1)) + || wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1)) continue; if(wa.map_state == IsViewable || getstate(wins[i]) == IconicState) manage(wins[i], &wa);

@@ -1360,7 +1360,7 @@ for(i = 0; i < num; i++) { /* now the transients */

if(!XGetWindowAttributes(dpy, wins[i], &wa)) continue; if(XGetTransientForHint(dpy, wins[i], &d1) - && (wa.map_state == IsViewable || getstate(wins[i]) == IconicState)) + && (wa.map_state == IsViewable || getstate(wins[i]) == IconicState)) manage(wins[i], &wa); } }

@@ -1479,8 +1479,8 @@ wa.background_pixmap = ParentRelative;

wa.event_mask = ButtonPressMask|ExposureMask; barwin = XCreateWindow(dpy, root, bx, by, bw, bh, 0, DefaultDepth(dpy, screen), - CopyFromParent, DefaultVisual(dpy, screen), - CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); + CopyFromParent, DefaultVisual(dpy, screen), + CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); XDefineCursor(dpy, barwin, cursor[CurNormal]); XMapRaised(dpy, barwin); strcpy(stext, "dwm-"VERSION);

@@ -1704,7 +1704,6 @@ }

void updatebar(void) { - if(dc.drawable != 0) XFreePixmap(dpy, dc.drawable); dc.drawable = XCreatePixmap(dpy, root, bw, bh, DefaultDepth(dpy, screen));

@@ -1839,7 +1838,7 @@ || (ee->request_code == X_GrabKey && ee->error_code == BadAccess)

|| (ee->request_code == X_CopyArea && ee->error_code == BadDrawable)) return 0; fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n", - ee->request_code, ee->error_code); + ee->request_code, ee->error_code); return xerrorxlib(dpy, ee); /* may call exit */ }