From 6eb3378c0c12ec0dadace80c70f45b24d66e1979 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 19 Mar 2026 08:44:42 +0800 Subject: [PATCH] opt: dont restore size per whe toggle_all_floating --- src/dispatch/bind_define.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index d6854a0c..68309356 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -1873,8 +1873,16 @@ int32_t toggle_all_floating(const Arg *arg) { Client *c = NULL; bool should_floating = !selmon->sel->isfloating; + wl_list_for_each(c, &clients, link) { if (VISIBLEON(c, selmon)) { + + if (c->isfloating && !should_floating) { + c->old_master_inner_per = 0.0f; + c->old_stack_inner_per = 0.0f; + set_size_per(selmon, c); + } + if (c->isfloating != should_floating) { setfloating(c, should_floating); }