From 5be4283d255bfc1967671cb5f80a7fe330a26723 Mon Sep 17 00:00:00 2001 From: Samq64 <81489795+Samq64@users.noreply.github.com> Date: Mon, 22 Dec 2025 20:35:46 -0500 Subject: [PATCH] Use is_scroller_layout() in a couple of places --- src/mango.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/mango.c b/src/mango.c index ffda8f0..6c7eb15 100644 --- a/src/mango.c +++ b/src/mango.c @@ -978,11 +978,7 @@ void clear_fullscreen_and_maximized_state(Monitor *m) { /*清除全屏标志,还原全屏时清0的border*/ void clear_fullscreen_flag(Client *c) { - if ((c->mon->pertag->ltidxs[get_tags_first_tag_num(c->tags)]->id == - SCROLLER || - c->mon->pertag->ltidxs[get_tags_first_tag_num(c->tags)]->id == - VERTICAL_SCROLLER) && - !c->isfloating) { + if (is_scroller_layout(c->mon) && !c->isfloating) { return; } @@ -5257,11 +5253,7 @@ bool want_restore_fullscreen(Client *target_client) { Client *c = NULL; wl_list_for_each(c, &clients, link) { if (c && c != target_client && c->tags == target_client->tags && - c == selmon->sel && - c->mon->pertag->ltidxs[get_tags_first_tag_num(c->tags)]->id != - SCROLLER && - c->mon->pertag->ltidxs[get_tags_first_tag_num(c->tags)]->id != - VERTICAL_SCROLLER) { + c == selmon->sel && !is_scroller_layout(c->mon)) { return false; } }