Window placement algorithm behaves unexpectedly with multiple displays
Affected version
Provide at least the following information:
- Distro: NixOS unstable, I could also reproduce it with Arch Linux
- Mutter version: 41.2
- The bug appears when using wayland; I have not tested X11.
Bug summary
When using only a single display, new windows are placed adjacent to each other if there is enough space on the current workspace. With multiple displays, this appears to only work when all the other workspaces are empty. Otherwise the windows are always cascaded, regardless of whether there is space on the current workspace.
Steps to reproduce
- Plug in Two monitors.
- Set the right one as the primary display; disable the "center all windows" and "span workspaces across all outputs" options.
- Open a fullscreen window on the right display
- Switch to a blank workspace.
- Open 4 small windows (remote typewriter emulators for example)
What happened
The windows are placed on top of each other
What did you expect to happen
The windows are placed adjacent to each other.