fix: avoid to tagmon null client
This commit is contained in:
10
src/maomao.c
10
src/maomao.c
@@ -6722,11 +6722,14 @@ void client_update_oldmonname_record(Client *c, Monitor *m) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void tagmon(const Arg *arg) {
|
void tagmon(const Arg *arg) {
|
||||||
Client *c = focustop(selmon);
|
|
||||||
unsigned int newtags = arg->ui ? c->tags : 0;
|
|
||||||
Monitor *m;
|
Monitor *m;
|
||||||
|
Client *c = focustop(selmon);
|
||||||
|
|
||||||
|
if (!c)
|
||||||
|
return;
|
||||||
|
|
||||||
|
unsigned int newtags = arg->ui ? c->tags : 0;
|
||||||
unsigned int target;
|
unsigned int target;
|
||||||
if (c) {
|
|
||||||
if (c == selmon->sel) {
|
if (c == selmon->sel) {
|
||||||
selmon->sel = NULL;
|
selmon->sel = NULL;
|
||||||
}
|
}
|
||||||
@@ -6758,7 +6761,6 @@ void tagmon(const Arg *arg) {
|
|||||||
}
|
}
|
||||||
warp_cursor_to_selmon(c->mon);
|
warp_cursor_to_selmon(c->mon);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void overview(Monitor *m) { grid(m); }
|
void overview(Monitor *m) { grid(m); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user