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
pull/143/head
bakkeby 3 years ago
parent 6e80cb5f36
commit 4a45f23643

@ -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;

Loading…
Cancel
Save