diff options
| author | bakkeby <[email protected]> | 2020-10-11 11:59:11 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-10-11 11:59:11 +0200 |
| commit | f9a3c2f88c56aafc34f5bc83fa368507408a6ca3 (patch) | |
| tree | 04c4a8983ea0980a63ab57fad077f69592d17a56 | |
| parent | 81ae102bb9ca83935d59661ba7271e1d4e721090 (diff) | |
| download | dwm-flexipatch-f9a3c2f88c56aafc34f5bc83fa368507408a6ca3.tar.gz dwm-flexipatch-f9a3c2f88c56aafc34f5bc83fa368507408a6ca3.zip | |
savefloats: disable restoring float position when using movemouse and resizemouse functions for a more intuitive behaviour
| -rw-r--r-- | dwm.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -2419,8 +2419,12 @@ movemouse(const Arg *arg) else if (abs((selmon->wy + selmon->wh) - (ny + HEIGHT(c))) < snap) ny = selmon->wy + selmon->wh - HEIGHT(c); if (!c->isfloating && selmon->lt[selmon->sellt]->arrange - && (abs(nx - c->x) > snap || abs(ny - c->y) > snap)) + && (abs(nx - c->x) > snap || abs(ny - c->y) > snap)) { + #if SAVEFLOATS_PATCH || EXRESIZE_PATCH + c->sfx = -9999; // disable savefloats when using movemouse + #endif // SAVEFLOATS_PATCH | EXRESIZE_PATCH togglefloating(NULL); + } if (!selmon->lt[selmon->sellt]->arrange || c->isfloating) { #if SAVEFLOATS_PATCH || EXRESIZE_PATCH resize(c, nx, ny, c->w, c->h, 1); @@ -2737,8 +2741,12 @@ resizemouse(const Arg *arg) && c->mon->wy + nh >= selmon->wy && c->mon->wy + nh <= selmon->wy + selmon->wh) { if (!c->isfloating && selmon->lt[selmon->sellt]->arrange - && (abs(nw - c->w) > snap || abs(nh - c->h) > snap)) + && (abs(nw - c->w) > snap || abs(nh - c->h) > snap)) { + #if SAVEFLOATS_PATCH || EXRESIZE_PATCH + c->sfx = -9999; // disable savefloats when using resizemouse + #endif // SAVEFLOATS_PATCH | EXRESIZE_PATCH togglefloating(NULL); + } } if (!selmon->lt[selmon->sellt]->arrange || c->isfloating) { #if RESIZECORNERS_PATCH || RESIZEPOINT_PATCH |
