diff options
Diffstat (limited to 'patch')
| -rw-r--r-- | patch/placemouse.c | 10 | ||||
| -rw-r--r-- | patch/placemouse.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/patch/placemouse.c b/patch/placemouse.c index f8f61eb..4f8fcc3 100644 --- a/patch/placemouse.c +++ b/patch/placemouse.c @@ -1,4 +1,12 @@ void +moveorplace(const Arg *arg) { + if ((!selmon->lt[selmon->sellt]->arrange || selmon->sel->isfloating)) + movemouse(arg); + else + placemouse(arg); +} + +void placemouse(const Arg *arg) { int x, y, px, py, ocx, ocy, nx = -9999, ny = -9999, freemove = 0; @@ -117,9 +125,9 @@ placemouse(const Arg *arg) attach(c); attachstack(c); selmon = m; - focus(c); } + focus(c); c->beingmoved = 0; if (nx != -9999) diff --git a/patch/placemouse.h b/patch/placemouse.h index 50acece..8687ae3 100644 --- a/patch/placemouse.h +++ b/patch/placemouse.h @@ -1,5 +1,6 @@ #define INTERSECTC(x,y,w,h,z) (MAX(0, MIN((x)+(w),(z)->x+(z)->w) - MAX((x),(z)->x)) \ * MAX(0, MIN((y)+(h),(z)->y+(z)->h) - MAX((y),(z)->y))) +static void moveorplace(const Arg *arg); static void placemouse(const Arg *arg); static Client *recttoclient(int x, int y, int w, int h); |
