mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: optimize setmon logic
This commit is contained in:
parent
7a8e395335
commit
8a4175eeda
1 changed files with 4 additions and 2 deletions
|
|
@ -1196,7 +1196,9 @@ void applyrules(Client *c) {
|
|||
}
|
||||
|
||||
int fullscreen_state_backup = c->isfullscreen || client_wants_fullscreen(c);
|
||||
setmon(c, mon, newtags, !c->isopensilent);
|
||||
setmon(c, mon, newtags,
|
||||
!c->isopensilent && (!c->istagsilent || !newtags ||
|
||||
newtags & mon->tagset[mon->seltags]));
|
||||
|
||||
if (!c->isopensilent &&
|
||||
(!c->istagsilent || c->tags & c->mon->tagset[c->mon->seltags]) &&
|
||||
|
|
@ -4333,7 +4335,7 @@ void setmon(Client *c, Monitor *m, unsigned int newtags, bool focus) {
|
|||
setfloating(c, c->isfloating);
|
||||
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
|
||||
}
|
||||
if (m && focus && (!c->istagsilent || c->tags & m->tagset[m->seltags]))
|
||||
if (m && focus)
|
||||
focusclient(focustop(m), 1);
|
||||
|
||||
if (!c->foreign_toplevel && m) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue