Introduction
Introduction Statistics Contact Development Disclaimer Help
tfinal style fixes - dwm - [fork] customized build of dwm, the dynamic window m…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 450b08dde2409846201175e226158ad4e2c61ea1
parent da80487c070b4004bf7451b069472b66320030f8
Author: Anselm R Garbe <[email protected]>
Date: Tue, 14 Jul 2009 16:26:04 +0100
final style fixes
Diffstat:
M dwm.c | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
---
diff --git a/dwm.c b/dwm.c
t@@ -380,7 +380,6 @@ void
arrange(void) {
Monitor *m;
- /* optimise two loops into one, check focus(NULL) */
for(m = mons; m; m = m->next)
showhide(m->stack);
focus(NULL);
t@@ -440,7 +439,7 @@ buttonpress(XEvent *e) {
}
for(i = 0; i < LENGTH(buttons); i++)
if(click == buttons[i].click && buttons[i].func && buttons[i].…
- && CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
+ && CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
buttons[i].func(click == ClkTagBar && buttons[i].arg.i…
}
t@@ -885,7 +884,7 @@ getstate(Window w) {
Atom real;
status = XGetWindowProperty(dpy, w, wmatom[WMState], 0L, 2L, False, wm…
- &real, &format, &n, &extra, (unsigned char **)&p);
+ &real, &format, &n, &extra, (unsigned char…
if(status != Success)
return -1;
if(n != 0)
t@@ -909,9 +908,7 @@ gettextprop(Window w, Atom atom, char *text, unsigned int …
if(name.encoding == XA_STRING)
strncpy(text, (char *)name.value, size - 1);
else {
- if(XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success
- && n > 0 && *list)
- {
+ if(XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success…
strncpy(text, *list, size - 1);
XFreeStringList(list);
}
t@@ -1022,8 +1019,8 @@ keypress(XEvent *e) {
keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
for(i = 0; i < LENGTH(keys); i++)
if(keysym == keys[i].keysym
- && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state)
- && keys[i].func)
+ && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state)
+ && keys[i].func)
keys[i].func(&(keys[i].arg));
}
t@@ -1168,7 +1165,7 @@ movemouse(const Arg *arg) {
nx = ocx + (ev.xmotion.x - x);
ny = ocy + (ev.xmotion.y - y);
if(snap && nx >= selmon->wx && nx <= selmon->wx + selm…
- && ny >= selmon->wy && ny <= selmon->wy + selm…
+ && ny >= selmon->wy && ny <= selmon->wy + selmon->wh) {
if(abs(selmon->wx - nx) < snap)
nx = selmon->wx;
else if(abs((selmon->wx + selmon->ww) - (nx + …
t@@ -1178,7 +1175,7 @@ movemouse(const Arg *arg) {
else if(abs((selmon->wy + selmon->wh) - (ny + …
ny = selmon->wy + selmon->wh - HEIGHT(…
if(!c->isfloating && selmon->lt[selmon->sellt]…
- && (abs(nx - c->x) > snap ||…
+ && (abs(nx - c->x) > snap || abs(ny - c->y) > …
togglefloating(NULL);
}
if(!selmon->lt[selmon->sellt]->arrange || c->isfloatin…
t@@ -1279,7 +1276,7 @@ resizemouse(const Arg *arg) {
ocx = c->x;
ocy = c->y;
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAs…
- 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…
do {
t@@ -1294,9 +1291,10 @@ resizemouse(const Arg *arg) {
nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
if(snap && nw >= selmon->wx && nw <= selmon->wx + selm…
- && nh >= selmon->wy && nh <= selmon->wy + selm…
+ && nh >= selmon->wy && nh <= selmon->wy + selmon->wh)
+ {
if(!c->isfloating && selmon->lt[selmon->sellt]…
- && (abs(nw - c->w) > snap || abs(nh - c->h)…
+ && (abs(nw - c->w) > snap || abs(nh - c->h) > …
togglefloating(NULL);
}
if(!selmon->lt[selmon->sellt]->arrange || c->isfloatin…
t@@ -1473,8 +1471,8 @@ setup(void) {
/* select for events */
wa.cursor = cursor[CurNormal];
wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask|Button…
- |EnterWindowMask|LeaveWindowMask|StructureNotifyMask
- |PropertyChangeMask;
+ |EnterWindowMask|LeaveWindowMask|StructureNotifyMask
+ |PropertyChangeMask;
XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
XSelectInput(dpy, root, wa.event_mask);
grabkeys();
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.