feat:add arg to keep tag when tagmon

This commit is contained in:
DreamMaoMao 2025-06-15 11:12:47 +08:00
parent 20d132de3f
commit b97222b6b0
2 changed files with 3 additions and 1 deletions

View file

@ -6702,13 +6702,14 @@ void tagsilent(const Arg *arg) {
void tagmon(const Arg *arg) {
Client *c = focustop(selmon);
unsigned int newtags = arg->ui ? c->tags : 0;
Monitor *m;
if (c) {
if (c == selmon->sel) {
selmon->sel = NULL;
}
m = dirtomon(arg->i);
setmon(c, m, 0, true);
setmon(c, m, newtags, true);
reset_foreign_tolevel(c);
// 重新计算居中的坐标
if (c->isfloating) {