GNOME Bugzilla – Bug 761336
Centered windows doesn't center the window on Wayland
Last modified: 2018-04-15 00:24:21 UTC
When on GNOME Wayland session, centered windows aren't correctly centered. This can be reproduced by opening e.g. GNOME Control Center. A quick debug tells me the window is trying to be places at negative coordinates.
the wayland protocol(s) we are using has no provision for centering windows.
As Matthias said, there is currently no support for providing any positioning intentions, as it is generally up to the compositor to do any positioning. That being said, it is possible to introduce such a protocol, the hard thing is to decide what the protocol should do. Such a protocol would for example not be "position at (x,y)" but either asked by the client itself i.e. a "please center me when I show up", or done by adding a field to the .desktop file which gnome-shell would use to figure out when to center. There is currently no consensus of what approach to do here yet though.
The lack of a protocol to setup the window position breaks the behavior of many applications that try to restore their previous states when loading (window position and size, and whether it's maximized or not). I don't really know about the limitations of wayland protocols, but this is certainly a regression.
You're mixing things up. This bug is about centering windows. Saving window size and stat works just fine under Wayland. Saving positions does not, but that is different from centering.
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new