mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: avoid useless view action
This commit is contained in:
parent
957b24f164
commit
9b144df48d
1 changed files with 7 additions and 7 deletions
14
src/mango.c
14
src/mango.c
|
|
@ -1202,11 +1202,9 @@ void applyrules(Client *c) {
|
|||
!c->isopensilent && (!c->istagsilent || !newtags ||
|
||||
newtags & mon->tagset[mon->seltags]));
|
||||
|
||||
if (!c->isopensilent &&
|
||||
(!c->istagsilent || c->tags & c->mon->tagset[c->mon->seltags]) &&
|
||||
c->mon &&
|
||||
((c->mon && c->mon != selmon) ||
|
||||
!(c->tags & (1 << (c->mon->pertag->curtag - 1))))) {
|
||||
if (c->mon &&
|
||||
!(c->mon == selmon && c->tags & c->mon->tagset[c->mon->seltags]) &&
|
||||
!c->isopensilent && !c->istagsilent) {
|
||||
c->animation.tag_from_rule = true;
|
||||
view_in_mon(&(Arg){.ui = c->tags}, true, c->mon);
|
||||
}
|
||||
|
|
@ -5156,7 +5154,8 @@ urgent(struct wl_listener *listener, void *data) {
|
|||
return;
|
||||
|
||||
if (focus_on_activate && !c->istagsilent && c != selmon->sel) {
|
||||
view(&(Arg){.ui = c->tags}, true);
|
||||
if (!(c->mon == selmon && c->tags & c->mon->tagset[c->mon->seltags]))
|
||||
view(&(Arg){.ui = c->tags}, true);
|
||||
focusclient(c, 1);
|
||||
} else if (c != focustop(selmon)) {
|
||||
if (client_surface(c)->mapped)
|
||||
|
|
@ -5278,7 +5277,8 @@ void activatex11(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
|
||||
if (focus_on_activate && !c->istagsilent && c != selmon->sel) {
|
||||
view(&(Arg){.ui = c->tags}, true);
|
||||
if (!(c->mon == selmon && c->tags & c->mon->tagset[c->mon->seltags]))
|
||||
view(&(Arg){.ui = c->tags}, true);
|
||||
wlr_xwayland_surface_activate(c->surface.xwayland, 1);
|
||||
focusclient(c, 1);
|
||||
need_arrange = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue