From 198b7cae1287a9ec56f5673e86b8bcb6dd5b721c Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 15 Dec 2022 17:36:34 +0000 Subject: [PATCH] ignore silent workspace rules to same workspace --- src/events/Windows.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index b552834a..beb28032 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -146,7 +146,9 @@ void Events::listener_mapWindow(void* owner, void* data) { requestedWorkspace = WORKSPACERQ; } - if (requestedWorkspace == PWORKSPACE->m_szName || requestedWorkspace == "name:" + PWORKSPACE->m_szName) + const auto JUSTWORKSPACE = WORKSPACERQ.contains(' ') ? WORKSPACERQ.substr(0, WORKSPACERQ.find_first_of(' ')) : WORKSPACERQ; + + if (JUSTWORKSPACE == PWORKSPACE->m_szName || JUSTWORKSPACE == "name:" + PWORKSPACE->m_szName) requestedWorkspace = ""; Debug::log(LOG, "Rule workspace matched by window %x, %s applied.", PWINDOW, r.szValue.c_str());