feat: dwindle movetoroot dispatch

This commit is contained in:
Ernesto Cruz 2026-05-26 13:25:35 +00:00
parent 887a50a54e
commit 35ccafb9d2
7 changed files with 75 additions and 2 deletions

View file

@ -2002,4 +2002,21 @@ int32_t focusid(const Arg *arg) {
Client *c = arg->tc;
focusclient(c, 1);
return 0;
}
int32_t movetoroot(const Arg *arg) {
if (!selmon)
return 0;
Client *c = arg->tc ? arg->tc : selmon->sel;
if (!c || c->isfloating)
return 0;
if (c->mon && c->mon->pertag->ltidxs[c->mon->pertag->curtag]->id == DWINDLE) {
uint32_t tag = c->mon->pertag->curtag;
bool stable = (arg->i == 0);
dwindle_movetoroot(&c->mon->pertag->dwindle_root[tag], c, stable);
arrange(c->mon, false, false);
}
return 0;
}