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)
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;
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);
}
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(;;) {
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(;;) {
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);
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);
}
}
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);
void
updatebar(void) {
-
if(dc.drawable != 0)
XFreePixmap(dpy, dc.drawable);
dc.drawable = XCreatePixmap(dpy, root, bw, bh, DefaultDepth(dpy, screen));
|| (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 */
}