[PATCH weston 3/6] libweston-desktop/xwayland: window type XWAYLAND cannot have a parent

Pekka Paalanen ppaalanen at gmail.com
Thu Nov 24 12:59:21 UTC 2016


On Thu, 24 Nov 2016 12:29:26 +0000
Daniel Stone <daniel at fooishbar.org> wrote:

> Hi,
> 
> On 24 November 2016 at 11:40, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > Add an assert to ensure that a window of type XWAYLAND is never
> > attempted with a parent.
> >
> > This essentially adding documentation.
> >
> > Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > ---
> >  libweston-desktop/xwayland.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c
> > index bd68bc6..0c4ff2b 100644
> > --- a/libweston-desktop/xwayland.c
> > +++ b/libweston-desktop/xwayland.c
> > @@ -74,6 +74,7 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
> >         bool to_add = (parent == NULL && state != XWAYLAND);
> >
> >         assert(state != NONE);
> > +       assert(!parent || state != XWAYLAND);  
> 
> From looking at the callers, it seems like it should be (!parent ||
> state == TRANSIENT). I'm a huge fan of adding documentation via
> asserts though!

Hi,

hm, Quentin said type XWAYLAND windows (mostly just override-redirect)
must not have a parent, and that's what I wanted to document since
XWAYLAND is the one with all the special handling.

Quentin?


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20161124/161c78c0/attachment.sig>


More information about the wayland-devel mailing list