fix: avoid fullscreen rule be override by floating state

This commit is contained in:
DreamMaoMao 2025-05-04 22:44:10 +08:00
parent 99b13588fb
commit f1ebf1c7c2

View file

@ -1687,12 +1687,15 @@ applyrules(Client *c) {
arrange(c->mon, false); arrange(c->mon, false);
} }
int fullscreen_state_backup = c->isfullscreen;
setmon(c, mon, newtags, !c->isopensilent); setmon(c, mon, newtags, !c->isopensilent);
if (!c->isopensilent && !(c->tags & (1 << (selmon->pertag->curtag - 1)))) { if (!c->isopensilent && !(c->tags & (1 << (selmon->pertag->curtag - 1)))) {
c->animation.from_rule = true; c->animation.from_rule = true;
view(&(Arg){.ui = c->tags}, true); view(&(Arg){.ui = c->tags}, true);
} }
setfullscreen(c, fullscreen_state_backup);
} }
void // 17 void // 17
@ -4909,7 +4912,7 @@ void resize(Client *c, struct wlr_box geo, int interact) {
c->need_output_flush = true; c->need_output_flush = true;
// oldgeom = c->geom; // oldgeom = c->geom;
bbox = (interact || (c->isfloating && !c->isfullscreen)) ? &sgeom : &c->mon->w; bbox = (interact || c->isfloating || c->isfullscreen) ? &sgeom : &c->mon->w;
if (strcmp(c->mon->pertag->ltidxs[c->mon->pertag->curtag]->name, if (strcmp(c->mon->pertag->ltidxs[c->mon->pertag->curtag]->name,
"scroller") == 0 && "scroller") == 0 &&