random window position with desktop shell

Pekka Paalanen ppaalanen at gmail.com
Fri Sep 25 01:37:45 PDT 2015


Hi Nancy

On Fri, 25 Sep 2015 07:03:41 +0000
Nancy Zou <lanz at qti.qualcomm.com> wrote:

> Dear All:
> 
> Can I ask why desktop shell create a new window with random initial
> position?

So that people who assume anything about the window position would get
caught. Non-deterministic positioning logic is good for that.

A lesser reason is that we have not bothered with implementing
any nice initial window positioning logic, and personally I think we
don't even want that in Weston's desktop shell.

> Can I modify it to fixed position in
> weston_view_set_initial_position?

Please do not. Clients should not assume anything about the initial
top-level window position when not maximized or fullscreened.

>  How can the Weston client get the
> window initial position?

They cannot. There is no public coordinate space to even describe it
with. See e.g. https://www.youtube.com/watch?v=_FjuPn7MXMs

It is a design decision in Wayland/desktop to not expose absolute
window positions to clients at all. This means that you simply cannot
know where a top-level window is precisely, you can only know which
outputs it overlaps with. 

Windows that are not top-level can often be placed relative to another
wl_surface. This is the only form of precise positioning supported on
desktops.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150925/1159a884/attachment.sig>


More information about the wayland-devel mailing list