fix: someting overview workspace not remove

This commit is contained in:
DreamMaoMao 2025-06-19 10:54:45 +08:00
parent 37120486c3
commit b211f50e27

View file

@ -7058,6 +7058,18 @@ void toggleoverview(const Arg *arg) {
unsigned int target;
unsigned int visible_client_number = 0;
if (selmon->isoverview) {
for (i = 1; i <= LENGTH(tags); i++) {
remove_workspace(i, selmon);
}
add_workspace(0, selmon);
} else {
remove_workspace(0, selmon);
for (i = 1; i <= LENGTH(tags); i++) {
add_workspace(i, selmon);
}
}
if (selmon->isoverview) {
wl_list_for_each(c, &clients,
link) if (c && c->mon == selmon &&
@ -7097,18 +7109,6 @@ void toggleoverview(const Arg *arg) {
}
}
if (selmon->isoverview) {
for (i = 1; i <= LENGTH(tags); i++) {
remove_workspace(i, selmon);
}
add_workspace(0, selmon);
} else {
remove_workspace(0, selmon);
for (i = 1; i <= LENGTH(tags); i++) {
add_workspace(i, selmon);
}
}
view(&(Arg){.ui = target}, false);
if (ov_tab_mode && selmon->isoverview && selmon->sel) {