QMessageBox not centered on application
-
@Pl45m4
For my part I haven't seen anything to like in it. I think it may (well) be lighter weight than Xorg. That may be a big factor. There must be a good reason why Ubuntu/GNOME has gone default Wayland. It's not that you "can't" position your window, it's that its philosophy is that you're "not allowed" to do that, it chooses where to put desktop things. -
A not uninteresting distinction to make here is that Wayland does allow applications to position their surfaces relative to each other, but not globally. So a modal dialog being shown centered on its' parent window is something that the protocol allows (well, technically the
xdg-shell
extension protocol). Qt implements that, at least KDE respects that (just double checked that the expected behavior happens on KDE Wayland), Gnome appears to not respect that.I think Wayland has some good design decisions, but also some very bad ones, and the worst one IMO is that the roles of display server and window manager were combined into a single program (the compositor) so if you don't like a compositor's window management style but its' display server side is the one most integrated into the environment (i.e supports the needed graphics card or whatever) - though luck!
@Perdrix I don't know if it is possible in WSL, but I'd try to change the desktop environment from Gnome to KDE or something else (maybe DWL). Gnome is far too hostile to anything which does not fully subsribe to its' world view - which includes Gtk3/4 and libadwaita. Qt tries its' best, but it is often not enough.
-
This is offtopic but as a native Linux user the last time (about a year ago) I looked at migrating from X11 to Wayland everything was alpha quality with a ton of bugs cropping up everywhere. To be fair most things were advertised as such (missing features, plenty of bugs and sharp edges).
The old wisdom goes that "once you're 90% done you just need to take care of the other 90%" applies here.
To go from a hobbyist weekend project (which it is at the moment) to a product that just works is a relentless boring grind where one has no choice but to work through the bugs and missing features and fix the sharp edges.
The common problem in open source is that nobody wants to do this boring and inglorious grunt work so it's not done.
I estimate that it'll take another 20-30 years of slow maturing until Wayland is "ready".
-
To try and help op progress, according to this the graphical system built into WSL uses the Weston compositor (not Gnome/Mutter), and it can't be (easily) replaced. I tried with a standalone Weston instance locally, and can reproduce the issue - the modal
QMessageBox
just pop ups at a random location each time, while under KWin it always opens centered in the parent window. So it would be a Weston issue.I couldn't find the exact issue in its' issue tracker, so if it something really blocking you I suppose you can open an issue - though more research is probably needed to make a useful bug report. Otherwise, install a Windows X server and do X11 forwarding to the host.
-