[RFC xserver 3/3] Xwayland: use _XWAYLAND_ALLOW_COMMITS property

Pekka Paalanen ppaalanen at gmail.com
Mon Dec 5 12:30:15 UTC 2016


On Mon, 5 Dec 2016 14:03:04 +0200
Pekka Paalanen <ppaalanen at gmail.com> wrote:

> On Thu, 24 Nov 2016 15:40:37 +0200
> Pekka Paalanen <ppaalanen at gmail.com> wrote:
> 
> > From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > 
> > The X11 window manager (XWM) of a Wayland compositor can use the
> > _XWAYLAND_ALLOW_COMMITS property to control when Xwayland sends
> > wl_surface.commit requests. If the property is not set, the behaviour
> > remains what it was.
> > 
> > XWM uses the property to inhibit commits until the window is ready to be
> > shown. This gives XWM time to set up the window decorations and internal
> > state before Xwayland does the first commit. XWM can use this to ensure
> > the first commit carries fully drawn decorations and the window
> > management state is correct when the window becomes visible.
> > 
> > Setting the property to zero inhibits further commits, and setting it to
> > non-zero allows commits. Deleting the property allows commits.
> > 
> > When the property is changed from zero to non-zero, there will be a
> > commit on next block_handler() call provided that some damage has been
> > recorded.
> > 
> > Without this patch (i.e. with the old behaviour) Xwayland can and will
> > commit the surface very soon as the application window has been realized
> > and drawn into.  This races with XWM and may cause visible glitches.
> > 
> > Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > ---
> >  hw/xwayland/xwayland.c | 110 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  hw/xwayland/xwayland.h |   3 ++
> >  2 files changed, 113 insertions(+)  
> 
> Hi all,
> 
> the reason this patch is RFC are the XXX comments in the code, and the
> question: is it ok for Xwayland to hook up to properties and implement
> functionality that way?
> 
> This patch was based on some whacky code from 2010, so the conventions
> might be off.
> 
> I've highlighted the XXX comments below.
> 
> Patches 1 and 2 OTOH would be ready for merging on my behalf.
> 
> Olivier asked about _NET_WM_SYNC_REQUEST - do you want me to fully
> implement the basic sync protocol too before accepting this series?

Hi,

forgot to mention that the WIP Weston counterpart for this series is:
https://patchwork.freedesktop.org/series/16109/
where the last patch uses the new property.


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.x.org/archives/xorg-devel/attachments/20161205/11df81a3/attachment.sig>


More information about the xorg-devel mailing list