aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-09-12 16:50:07 +0100
committervaxerski <[email protected]>2023-09-12 16:50:10 +0100
commitbe19773aaa4507fe6246f318b3bb4b969d79dc97 (patch)
treefc664fb5e7ce502e280f91213ba533bc36813201
parent2e34548aea5b4a0e131a365693227f8739c0af6d (diff)
downloadHyprland-be19773aaa4507fe6246f318b3bb4b969d79dc97.tar.gz
Hyprland-be19773aaa4507fe6246f318b3bb4b969d79dc97.zip
windowrules: fix workspace rule separation
fixes #3265
-rw-r--r--src/events/Windows.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index c90b19fd..c0c645f2 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -229,17 +229,16 @@ void Events::listener_mapWindow(void* owner, void* data) {
if (PWINDOW->m_bPinned && !PWINDOW->m_bIsFloating)
PWINDOW->m_bPinned = false;
- const CVarList WORKSPACEARGS = CVarList(requestedWorkspace, 2, ' ');
+ const CVarList WORKSPACEARGS = CVarList(requestedWorkspace, 0, ' ');
if (!WORKSPACEARGS[0].empty()) {
- std::string requestedWorkspaceName;
- const int REQUESTEDWORKSPACEID = getWorkspaceIDFromString(WORKSPACEARGS[0], requestedWorkspaceName);
+ if (WORKSPACEARGS[WORKSPACEARGS.size() - 1].find("silent") == 0)
+ workspaceSilent = true;
- if (REQUESTEDWORKSPACEID != INT_MAX) {
-
- if (WORKSPACEARGS[1].find("silent") == 0)
- workspaceSilent = true;
+ std::string requestedWorkspaceName = WORKSPACEARGS.join(" ", 0, workspaceSilent ? WORKSPACEARGS.size() - 1 : 0);
+ const int REQUESTEDWORKSPACEID = getWorkspaceIDFromString(requestedWorkspaceName, requestedWorkspaceName);
+ if (REQUESTEDWORKSPACEID != INT_MAX) {
auto pWorkspace = g_pCompositor->getWorkspaceByID(REQUESTEDWORKSPACEID);
if (!pWorkspace)
@@ -259,7 +258,8 @@ void Events::listener_mapWindow(void* owner, void* data) {
PMONITOR = g_pCompositor->m_pLastMonitor;
}
- }
+ } else
+ workspaceSilent = false;
}
if (PWINDOW->m_bIsFloating) {