From 4e87e3b80d4053b9f8fcccc3f4ff477e44b80bc8 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 6 Jun 2026 11:20:19 +0800 Subject: [PATCH] opt: fix scan out support for fullscreen --- src/animation/client.h | 16 ++++++++++++++-- src/mango.c | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/animation/client.h b/src/animation/client.h index 238da9fb..8aa39050 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -305,7 +305,8 @@ void client_draw_shadow(Client *c) { if (c->iskilling || !client_surface(c)->mapped || c->isnoshadow) return; - if (!config.shadows || (!c->isfloating && config.shadow_only_floating)) { + if (!config.shadows || c->isfullscreen || + (!c->isfloating && config.shadow_only_floating)) { if (c->shadow->node.enabled) wlr_scene_node_set_enabled(&c->shadow->node, false); return; @@ -405,7 +406,7 @@ void apply_split_border(Client *c, bool hit_no_border) { const Layout *layout = c->mon->pertag->ltidxs[c->mon->pertag->curtag]; if (hit_no_border || !ISTILED(c) || layout->id != DWINDLE || - !config.dwindle_manual_split) { + !config.dwindle_manual_split || c->isfullscreen) { if (c->splitindicator[0]->node.enabled) { wlr_scene_node_set_enabled(&c->splitindicator[0]->node, false); } @@ -492,6 +493,17 @@ void apply_border(Client *c) { if (!c || c->iskilling || !client_surface(c)->mapped) return; + if (c->isfullscreen) { + if (c->border->node.enabled) { + wlr_scene_node_set_enabled(&c->border->node, false); + } + return; + } else { + if (!c->border->node.enabled) { + wlr_scene_node_set_enabled(&c->border->node, true); + } + } + bool hit_no_border = check_hit_no_border(c); apply_split_border(c, hit_no_border); diff --git a/src/mango.c b/src/mango.c index 2f503a5e..74d4c196 100644 --- a/src/mango.c +++ b/src/mango.c @@ -5526,6 +5526,7 @@ void setfullscreen(Client *c, int32_t fullscreen) // 用自定义全屏代理自 wlr_scene_node_raise_to_top(&c->scene->node); // 将视图提升到顶层 if (!is_scroller_layout(c->mon) || c->isfloating) resize(c, c->mon->m, 1); + } else { c->bw = c->isnoborder ? 0 : config.borderpx; if (c->isfloating)