mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-28 07:58:47 -04:00
feat: add dispatch toggle_all_floating
This commit is contained in:
parent
949063804a
commit
c2559f6c7c
5 changed files with 22 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue