mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-02 06:46:29 -04:00
fix: crash after change session
This commit is contained in:
parent
948eb7bb32
commit
15f2056c14
1 changed files with 12 additions and 5 deletions
17
maomao.c
17
maomao.c
|
|
@ -2216,11 +2216,18 @@ closemon(Monitor *m)
|
|||
if (c->isfloating && c->geom.x > m->m.width)
|
||||
resize(c, (struct wlr_box){.x = c->geom.x - m->w.width, .y = c->geom.y,
|
||||
.width = c->geom.width, .height = c->geom.height}, 0);
|
||||
if (c->mon == m)
|
||||
setmon(c, selmon, c->tags);
|
||||
if (c->mon == m) {
|
||||
if(selmon == NULL) {
|
||||
c->mon = NULL;
|
||||
} else {
|
||||
setmon(c, selmon, c->tags);
|
||||
}
|
||||
}
|
||||
}
|
||||
focusclient(focustop(selmon), 1);
|
||||
printstatus();
|
||||
if(selmon) {
|
||||
focusclient(focustop(selmon), 1);
|
||||
printstatus();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3128,7 +3135,7 @@ void focusclient(Client *c, int lift) {
|
|||
if (c && lift)
|
||||
wlr_scene_node_raise_to_top(&c->scene->node); // 将视图提升到顶层
|
||||
|
||||
if (c && client_surface(c) == old_keyboard_focus_surface)
|
||||
if (c && client_surface(c) == old_keyboard_focus_surface && selmon && selmon->sel)
|
||||
return;
|
||||
|
||||
if (selmon && selmon->sel && selmon->sel->foreign_toplevel) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue