tapplied some necessary changes - dwm - [fork] customized build of dwm, the dyn… | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit ca3e847e459e1ba43f45513877d39d50cce7a0c5 | |
parent c2737b7b9317743e3430c71bc0a9afcc6b0f70f7 | |
Author: Anselm R Garbe <[email protected]> | |
Date: Wed, 20 Feb 2008 08:09:26 +0000 | |
applied some necessary changes | |
Diffstat: | |
M dwm.c | 17 ++++++++--------- | |
1 file changed, 8 insertions(+), 9 deletions(-) | |
--- | |
diff --git a/dwm.c b/dwm.c | |
t@@ -117,7 +117,6 @@ typedef struct { | |
} Regs; | |
typedef struct { | |
- int monitor; | |
Window barwin; | |
int sx, sy, sw, sh, wax, way, wah, waw; | |
Bool *seltags; | |
t@@ -1164,11 +1163,13 @@ void | |
movemouse(Client *c) { | |
int x1, y1, ocx, ocy, di, nx, ny; | |
unsigned int dui; | |
+ Monitor *m; | |
Window dummy; | |
XEvent ev; | |
ocx = nx = c->x; | |
ocy = ny = c->y; | |
+ m = &monitors[c->monitor]; | |
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAs… | |
None, cursor[CurMove], CurrentTime) != GrabSuccess) | |
return; | |
t@@ -1188,7 +1189,6 @@ movemouse(Client *c) { | |
XSync(dpy, False); | |
nx = ocx + (ev.xmotion.x - x1); | |
ny = ocy + (ev.xmotion.y - y1); | |
- Monitor *m = &monitors[monitorat()]; | |
if(abs(m->wax - nx) < SNAP) | |
nx = m->wax; | |
else if(abs((m->wax + m->waw) - (nx + c->w + 2 * c->bo… | |
t@@ -1197,11 +1197,10 @@ movemouse(Client *c) { | |
ny = m->way; | |
else if(abs((m->way + m->wah) - (ny + c->h + 2 * c->bo… | |
ny = m->way + m->wah - c->h - 2 * c->border; | |
- if((monitors[selmonitor].layout->arrange != floating) … | |
+ if((m->layout->arrange != floating) && (abs(nx - c->x)… | |
togglefloating(NULL); | |
- if((monitors[selmonitor].layout->arrange == floating) … | |
+ if((m->layout->arrange == floating) || c->isfloating) | |
resize(c, nx, ny, c->w, c->h, False); | |
- memcpy(c->tags, monitors[monitorat()].seltags, sizeof … | |
break; | |
} | |
} | |
t@@ -1335,10 +1334,12 @@ void | |
resizemouse(Client *c) { | |
int ocx, ocy; | |
int nw, nh; | |
+ Monitor *m; | |
XEvent ev; | |
ocx = c->x; | |
ocy = c->y; | |
+ m = &monitors[c->monitor]; | |
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAs… | |
None, cursor[CurResize], CurrentTime) != GrabSuccess) | |
return; | |
t@@ -1363,9 +1364,9 @@ resizemouse(Client *c) { | |
nw = 1; | |
if((nh = ev.xmotion.y - ocy - 2 * c->border + 1) <= 0) | |
nh = 1; | |
- if((monitors[selmonitor].layout->arrange != floating) … | |
+ if((m->layout->arrange != floating) && (abs(nw - c->w)… | |
togglefloating(NULL); | |
- if((monitors[selmonitor].layout->arrange == floating) … | |
+ if((m->layout->arrange == floating) || c->isfloating) | |
resize(c, c->x, c->y, nw, nh, True); | |
break; | |
} | |
t@@ -1600,8 +1601,6 @@ setup(void) { | |
/* init geometry */ | |
m = &monitors[i]; | |
- m->monitor = i; | |
- | |
if (mcount != 1 && isxinerama) { | |
m->sx = info[i].x_org; | |
m->sy = info[i].y_org; |