From b06871fad4c4342915bb025eb9d947bfbd7a64d2 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 19 Jun 2025 11:22:59 +0800 Subject: [PATCH] opt: small optimize --- src/ext-workspace/tag-worksapce.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ext-workspace/tag-worksapce.h b/src/ext-workspace/tag-worksapce.h index f34e4a4f..28c3147b 100644 --- a/src/ext-workspace/tag-worksapce.h +++ b/src/ext-workspace/tag-worksapce.h @@ -117,10 +117,9 @@ void cleanup_workspaces_by_monitor(Monitor *m) { } static void remove_workspace_by_tag(unsigned int tag, Monitor *m) { - char *name = get_name_from_tag(tag); struct workspace *workspace, *tmp; wl_list_for_each_safe(workspace, tmp, &workspaces, link) { - if (strcmp(workspace->name, name) == 0 && workspace->m == m) { + if (workspace->tag == tag && workspace->m == m) { // If this is the current workspace, we need to handle that if (m->workspace_current == workspace) { // Find another workspace to make current (maybe the overview?)