From b211f50e2773b96d4a2ee0dd039f59ecb24abae5 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 19 Jun 2025 10:54:45 +0800 Subject: [PATCH] fix: someting overview workspace not remove --- src/maomao.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/maomao.c b/src/maomao.c index 32c04381..aef5ed3f 100644 --- a/src/maomao.c +++ b/src/maomao.c @@ -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) {