xdg-shell and always centered surfaces

x414e54 x414e54 at linux.com
Sat Mar 21 04:34:19 PDT 2015


I have been working on a GUI toolkit and looking to experiment porting it
to wayland.

Currently I am using a wl_shell_surface and have dialogs, tooltips, etc.
working fine, just waiting on relative mouse for implementing spinners,
rotations etc.

However I am looking at positioning the initial parent surfaces, for uses
such as splash screens. These need to be centered (if the WM supports
this).

I noticed that the xdg-shell protocol is available but currently only has
set_window_geometry which takes an x and y co-ordinates.
I have no idea what x and y are supposed to be relative to?

In CSS to create a centered element you would use margin: auto and even if
the browser was resized it would still stay centered.
Setting fixed x and y co-ordinates in CSS is never going to work.

How are you supposed to tell the WM you would like an always centered shell
surface?

Thank you for the help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150321/4d83e92c/attachment.html>


More information about the wayland-devel mailing list