init_ws_for_output: Change loop that assigns existing workspaces

I find the new loop more straightforward and easy to understand.

Old loop used to be:
    foreach assignment:
        foreach assignment2:
            // find if this is the first valid output in this assignment
        foreach workspace:
            // find matching by assignment name
        if workspace:
            move workspace to output
New loop is:
    foreach workspace:
        foreach assignment:
            if workspace is assigned to this output:
                move workspace to output

With this, workspace assignments triggered by numbers during output
changes should be handled correctly.

Fixes #3685
This commit is contained in:
Orestis Floros
2020-04-16 22:00:21 +02:00
parent 6b2d8cb4d6
commit 0d5a7eeff8
2 changed files with 22 additions and 25 deletions

View File

@ -46,3 +46,4 @@ working. Please reach out to us in that case!
• fix a bug with i3-nagbar not starting after it has already started once
• fix conflict when moving parent of fullscreen window to workspace
• fix Xorg memory leak with i3bar
• fix named workspace assignments on output changes