create_workspace_on_output: Prevent duplicate workspace nums

When going through the `binding_workspace_names` to prioritize
user-specified names, we only check if the workspace exists, not the
workspace number. If the user specified a `bindsym … workspace number X`
directive, then it is appended in `binding_workspace_names` and a
workspace is created using that number even though from the POV of a
user that uses numbers to change workspaces, that workspace already
exists.

In similar code here:
1d9160f2d2/src/workspace.c (L997)
we do the check.

Fixes #4238
This commit is contained in:
Orestis Floros
2020-11-10 10:24:15 +01:00
parent d0067077ed
commit 68258785ac
2 changed files with 6 additions and 4 deletions

View File

@ -17,5 +17,4 @@ strongly encouraged to upgrade.
│ Bugfixes │
└────────────────────────────┘
placeholder
when initializing new outputs, avoid duplicating workspace numbers