mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-21 05:34:05 -04:00
fix: crash in some crossmon dispatch
This commit is contained in:
parent
b0349924da
commit
a7abe4c3c4
1 changed files with 5 additions and 4 deletions
|
|
@ -974,7 +974,7 @@ int tag(const Arg *arg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int tagmon(const Arg *arg) {
|
int tagmon(const Arg *arg) {
|
||||||
Monitor *m = NULL;
|
Monitor *m = NULL,*cm = NULL;
|
||||||
Client *c = focustop(selmon);
|
Client *c = focustop(selmon);
|
||||||
|
|
||||||
if (!c)
|
if (!c)
|
||||||
|
|
@ -983,11 +983,12 @@ int tagmon(const Arg *arg) {
|
||||||
if (arg->i != UNDIR) {
|
if (arg->i != UNDIR) {
|
||||||
m = dirtomon(arg->i);
|
m = dirtomon(arg->i);
|
||||||
} else if (arg->v) {
|
} else if (arg->v) {
|
||||||
wl_list_for_each(m, &mons, link) {
|
wl_list_for_each(cm, &mons, link) {
|
||||||
if (!m->wlr_output->enabled) {
|
if (!cm->wlr_output->enabled) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (regex_match(arg->v, m->wlr_output->name)) {
|
if (regex_match(arg->v, cm->wlr_output->name)) {
|
||||||
|
m = cm;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue