opt: Adopt a more flexible way to control window hiding

This commit is contained in:
DreamMaoMao 2026-06-29 09:07:13 +08:00
parent 6b83d4d7e9
commit 634ca7a51c
5 changed files with 21 additions and 45 deletions

View file

@ -661,8 +661,10 @@ struct ivec2 clip_to_hide(Client *c, struct wlr_box *clip_box) {
(ISSCROLLTILED(c) || c->animation.tagouting || c->animation.tagining)) {
c->is_clip_to_hide = true;
wlr_scene_node_set_enabled(&c->scene->node, false);
} else if (c->is_clip_to_hide && VISIBLEON(c, c->mon)) {
} else if (c->is_clip_to_hide && VISIBLEON(c, c->mon) &&
!c->is_logic_hide) {
c->is_clip_to_hide = false;
c->is_logic_hide = false;
wlr_scene_node_set_enabled(&c->scene->node, true);
}

View file

@ -45,8 +45,10 @@ void set_tagin_animation(Monitor *m, Client *c) {
void set_arrange_visible(Monitor *m, Client *c, bool want_animation) {
if (!ISTILED(c) || (!c->is_clip_to_hide || !is_scroller_layout(c->mon))) {
if ((!ISTILED(c) || (!c->is_clip_to_hide || !is_scroller_layout(c->mon))) &&
!c->is_logic_hide) {
c->is_clip_to_hide = false;
c->is_logic_hide = false;
wlr_scene_node_set_enabled(&c->scene->node, true);
wlr_scene_node_set_enabled(&c->scene_surface->node, true);
}