opt: avoid useless caculate

This commit is contained in:
DreamMaoMao 2026-05-14 16:21:16 +08:00
parent 6f2657a73b
commit b78151cca9
3 changed files with 66 additions and 44 deletions

View file

@ -248,7 +248,7 @@ void apply_shield(Client *c, struct wlr_box clip_box) {
void apply_split_border(Client *c, bool hit_no_border) {
if (c->iskilling || !client_surface(c)->mapped)
if (c->iskilling || !c->mon || !client_surface(c)->mapped)
return;
const Layout *layout = c->mon->pertag->ltidxs[c->mon->pertag->curtag];