diff options
| author | justin4046 <71111866+justin4046@users.noreply.github.com> | 2026-03-05 09:14:05 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 15:14:05 +0000 |
| commit | 4c60d9df70c67b1d74388c69b46374e46371ff1f (patch) | |
| tree | 1d6e40832091197a7e904e044f5761d4c2e80b5e /src/desktop/view/Window.cpp | |
| parent | b7dfb47566c3c111573ef9dc6293a764bc92c1e7 (diff) | |
desktop/rules: fix empty workspace handling (#13544)
Diffstat (limited to 'src/desktop/view/Window.cpp')
| -rw-r--r-- | src/desktop/view/Window.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp index ea2b9526..abf4da95 100644 --- a/src/desktop/view/Window.cpp +++ b/src/desktop/view/Window.cpp @@ -1871,11 +1871,12 @@ void CWindow::mapWindow() { if (WORKSPACEARGS.contains("silent")) workspaceSilent = true; - if (WORKSPACEARGS.contains("empty") && PWORKSPACE->getWindows() <= 1) { + auto joined = WORKSPACEARGS.join(" ", 0, workspaceSilent ? WORKSPACEARGS.size() - 1 : 0); + if (joined.starts_with("empty") && PWORKSPACE->getWindows() == 0) { requestedWorkspaceID = PWORKSPACE->m_id; requestedWorkspaceName = PWORKSPACE->m_name; } else { - auto result = getWorkspaceIDNameFromString(WORKSPACEARGS.join(" ", 0, workspaceSilent ? WORKSPACEARGS.size() - 1 : 0)); + auto result = getWorkspaceIDNameFromString(joined); requestedWorkspaceID = result.id; requestedWorkspaceName = result.name; } |
