From 400629aafa4a218fcb87b67478e8a5c81c711c01 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 27 Sep 2025 14:43:20 +0800 Subject: [PATCH] opt: not reset curtag when move showing scratchpat from other tag --- src/mango.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mango.c b/src/mango.c index 04ecec3..7c91353 100644 --- a/src/mango.c +++ b/src/mango.c @@ -1012,13 +1012,13 @@ bool switch_scratchpad_client_state(Client *c) { } if (c->is_in_scratchpad && c->is_scratchpad_show && - (selmon->tagset[selmon->seltags] & c->tags) == 0) { - unsigned int target = - get_tags_first_tag(selmon->tagset[selmon->seltags]); - tag_client(&(Arg){.ui = target}, c); + (c->mon->tagset[c->mon->seltags] & c->tags) == 0) { + c->tags = c->mon->tagset[c->mon->seltags]; + arrange(c->mon, false); + focusclient(c, true); return true; } else if (c->is_in_scratchpad && c->is_scratchpad_show && - (selmon->tagset[selmon->seltags] & c->tags) != 0) { + (c->mon->tagset[c->mon->seltags] & c->tags) != 0) { set_minimized(c); return true; } else if (c && c->is_in_scratchpad && !c->is_scratchpad_show) {