xdg-shell and always centered surfaces

Jasper St. Pierre jstpierre at mecheye.net
Mon Apr 13 09:03:37 PDT 2015


Hi.

set_window_geometry is about the "window geometry" of a surface,
relative to the overall surface. It's a difficult concept to explain,
but I feel the docs do a good enough job.

Currently it's not possible to specify initial window location. Can
you give your exact use case here so we can think about how it would
work? Is it centering dialogs? You mentioned something about splash
screens, but I'm not sure what that means.

On Sat, Mar 21, 2015 at 4:34 AM, x414e54 <x414e54 at linux.com> wrote:
> 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
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>



-- 
  Jasper


More information about the wayland-devel mailing list