I am trying to implement a splash screen which needs to start centered both vertically and horizontally when not fullscreen or maximized. Currently I am using wl_shell_surface but there is no way to advise this to the compositor. I have looked at xdg-shell.xml and there is set_window_geometry with an x and y co-ordinates but I assume they only work if the surface has a parent? If they do work without a parent what are they relative to? If the dimensions of whatever the splash surface is relative to change then it would no longer be centered. This would need an interface similar to the CSS "margin" where the surface could be set to "auto" would always be centered (until the user moved it). After the user moves the surface it should not be able to re-center itself.
Another option is to make a specific splash screen surface meta class or set_splash/set_temporarysurface/etc. and then the compositor can render this wherever it likes.
Yeah, a splash-screen window class would be the way to do this, but honestly we mostly just don't have splash screens in the first place these days. There is no other way to anchor yourself to the centre of the screen.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/wayland/wayland/issues/40.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.