GNOME Bugzilla – Bug 774894
Default overlapping window placement / positioning on top of other windows is top-left in Wayland
Last modified: 2021-07-05 14:22:19 UTC
There are essentially three scenarios when creating a new window (by launching an app or something): 1- There are no windows already taking space on the screen 2- There are windows but there is sufficient free space to fit the new one on the side 3- There are windows, and not enough space to tile, so they need to overlap In case #1, the wayland-based gnome-shell places the newly created window in the center of the screen, which is what I expect In case #2, it also correctly places it in the empty spot. In case #3, it places the newly created window as far as possible in the top-left "working area" of the screen, while overlapping the other window. This is unexpected. I would expect, in this case, the newly created overlapping window to be centered, it would feel much more natural that way (top-left just "feels" broken, like in the old days—there used to be a bug about that back then, which was resolved with the centering, IIRC).
What does wayland have to do with this? What you describe is the regular placement algorithm that mutter has inherited from metacity ...
Created attachment 340781 [details] screencast of the behavior on X Well, yes and no... some years back, gnome-shell/mutter got fixed at least partially, with the result that in scenario #3 the windows would now often get spawned overlapping "not in the top-left corner" (oftentimes centered). At least that's what I can see now with a quick test where I start gnome-tweak-tool's window on top of Nautilus' while running the X session, see the attached screencast for proof. Interestingly it does not work in all cases; if you try to open a nautilus window on top of the nautilus window, the 2nd one gets sent to the corner. As if it was size-dependent, or if there was a bug in the algorithm... Doing the same test as what I've shown in the attached screencast in the wayland version of gnome-shell makes gnome-tweak-tool's window spawn always in the corner instead of centered atop nautilus.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.