Introduction
Introduction Statistics Contact Development Disclaimer Help
tDon't restrict snap in mousemove - dwm - [fork] customized build of dwm, the d…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 5b238c8dab945023b6a16a6c9f642b11137f2204
parent 022d07605412bc5bd9726f74af9355c562ba4957
Author: Markus Teich <[email protected]>
Date: Sat, 7 Jan 2017 17:21:30 +0100
Don't restrict snap in mousemove
This also fixes a bug where client windows only switch to floating mode when the
mouse is dragged in one specific direction.
Diffstat:
M dwm.c | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
---
diff --git a/dwm.c b/dwm.c
t@@ -1170,20 +1170,17 @@ movemouse(const Arg *arg)
nx = ocx + (ev.xmotion.x - x);
ny = ocy + (ev.xmotion.y - y);
- if (nx >= selmon->wx && nx <= selmon->wx + selmon->ww
- && 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 +…
- nx = selmon->wx + selmon->ww - WIDTH(c…
- if (abs(selmon->wy - ny) < snap)
- ny = selmon->wy;
- 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(ny - c->y) > …
- togglefloating(NULL);
- }
+ if (abs(selmon->wx - nx) < snap)
+ nx = selmon->wx;
+ else if (abs((selmon->wx + selmon->ww) - (nx + WIDTH(c…
+ nx = selmon->wx + selmon->ww - WIDTH(c);
+ if (abs(selmon->wy - ny) < snap)
+ ny = selmon->wy;
+ else if (abs((selmon->wy + selmon->wh) - (ny + HEIGHT(…
+ ny = selmon->wy + selmon->wh - HEIGHT(c);
+ if (!c->isfloating && selmon->lt[selmon->sellt]->arran…
+ && (abs(nx - c->x) > snap || abs(ny - c->y) > snap))
+ togglefloating(NULL);
if (!selmon->lt[selmon->sellt]->arrange || c->isfloati…
resize(c, nx, ny, c->w, c->h, 1);
break;
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.