mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
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
This commit is contained in:
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…
Reference in New Issue
Block a user