summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2021-04-14 17:16:05 +0200
committerbakkeby <[email protected]>2021-04-14 17:16:05 +0200
commit4a45f23643ac6767affaf73f05de606e07c30fbf (patch)
tree7df10f7c724fcb7a67e2633d03db1e15aa685719 /patch
parent6e80cb5f366b297c124da5139abf3b2199887e04 (diff)
downloaddwm-flexipatch-4a45f23643ac6767affaf73f05de606e07c30fbf.tar.gz
dwm-flexipatch-4a45f23643ac6767affaf73f05de606e07c30fbf.zip
placemouse: fix for crash when moving between monitors with different tags and there is no selected client on that monitor / tag
This is ref. https://github.com/bakkeby/patches/issues/27
Diffstat (limited to 'patch')
-rw-r--r--patch/placemouse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/patch/placemouse.c b/patch/placemouse.c
index 4f8fcc3..4d1a84b 100644
--- a/patch/placemouse.c
+++ b/patch/placemouse.c
@@ -1,6 +1,6 @@
void
moveorplace(const Arg *arg) {
- if ((!selmon->lt[selmon->sellt]->arrange || selmon->sel->isfloating))
+ if ((!selmon->lt[selmon->sellt]->arrange || (selmon->sel && selmon->sel->isfloating)))
movemouse(arg);
else
placemouse(arg);
@@ -122,6 +122,7 @@ placemouse(const Arg *arg)
detachstack(c);
arrangemon(c->mon);
c->mon = m;
+ c->tags = m->tagset[m->seltags];
attach(c);
attachstack(c);
selmon = m;