From 94e47bc3b039dafc264e64f465c9fabb523d359d Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 13 Nov 2025 10:55:44 +0800 Subject: [PATCH] opt: optmize restore_minimized size and not restore namedscratchpad --- src/dispatch/bind_define.h | 2 +- src/mango.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 27f7977..d653bb1 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -476,7 +476,7 @@ int restore_minimized(const Arg *arg) { } wl_list_for_each(c, &clients, link) { - if (c->isminied) { + if (c->isminied && !c->isnamedscratchpad) { c->is_scratchpad_show = 0; c->is_in_scratchpad = 0; c->isnamedscratchpad = 0; diff --git a/src/mango.c b/src/mango.c index edd5056..999c356 100644 --- a/src/mango.c +++ b/src/mango.c @@ -4807,8 +4807,11 @@ void setsel(struct wl_listener *listener, void *data) { } void show_hide_client(Client *c) { + unsigned int target = 1; + + set_size_per(c->mon, c); + target = get_tags_first_tag(c->oldtags); - unsigned int target = get_tags_first_tag(c->oldtags); if (!c->is_in_scratchpad) { tag_client(&(Arg){.ui = target}, c); } else {