feat: add dispatch toggle_all_floating

This commit is contained in:
DreamMaoMao 2026-03-19 07:56:29 +08:00
parent 949063804a
commit c2559f6c7c
5 changed files with 22 additions and 1 deletions

View file

@ -1866,3 +1866,19 @@ int32_t scroller_stack(const Arg *arg) {
arrange(selmon, false, false);
return 0;
}
int32_t toggle_all_floating(const Arg *arg) {
if (!selmon || !selmon->sel)
return 0;
Client *c = NULL;
bool should_floating = !selmon->sel->isfloating;
wl_list_for_each(c, &clients, link) {
if (VISIBLEON(c, selmon)) {
if (c->isfloating != should_floating) {
setfloating(c, should_floating);
}
}
}
return 0;
}