mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-19 14:33:16 -04:00
opt: small optimize
This commit is contained in:
parent
7549a33cf0
commit
b06871fad4
1 changed files with 1 additions and 2 deletions
|
|
@ -117,10 +117,9 @@ void cleanup_workspaces_by_monitor(Monitor *m) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void remove_workspace_by_tag(unsigned int tag, Monitor *m) {
|
static void remove_workspace_by_tag(unsigned int tag, Monitor *m) {
|
||||||
char *name = get_name_from_tag(tag);
|
|
||||||
struct workspace *workspace, *tmp;
|
struct workspace *workspace, *tmp;
|
||||||
wl_list_for_each_safe(workspace, tmp, &workspaces, link) {
|
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 this is the current workspace, we need to handle that
|
||||||
if (m->workspace_current == workspace) {
|
if (m->workspace_current == workspace) {
|
||||||
// Find another workspace to make current (maybe the overview?)
|
// Find another workspace to make current (maybe the overview?)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue