opt: not reset curtag when move showing scratchpat from other tag

This commit is contained in:
DreamMaoMao 2025-09-27 14:43:20 +08:00
parent 31b676b639
commit 400629aafa

View file

@ -1012,13 +1012,13 @@ bool switch_scratchpad_client_state(Client *c) {
} }
if (c->is_in_scratchpad && c->is_scratchpad_show && 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) {
unsigned int target = c->tags = c->mon->tagset[c->mon->seltags];
get_tags_first_tag(selmon->tagset[selmon->seltags]); arrange(c->mon, false);
tag_client(&(Arg){.ui = target}, c); focusclient(c, true);
return true; return true;
} else if (c->is_in_scratchpad && c->is_scratchpad_show && } 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); set_minimized(c);
return true; return true;
} else if (c && c->is_in_scratchpad && !c->is_scratchpad_show) { } else if (c && c->is_in_scratchpad && !c->is_scratchpad_show) {