xserver/hw
Pekka Paalanen 9f4d308cda xwayland: use _XWAYLAND_ALLOW_COMMITS property
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.

v3:
- introduced a simple setter for xwl_window::allow_commits
- split xwl_window_property_allow_commits() out of
  xwl_property_callback()
- check MakeAtom(_XWAYLAND_ALLOW_COMMITS)

v2:
- use PropertyStateCallback instead of XACE, based on the patch
  "xwayland: Track per-window support for netwm frame sync" by
  Adam Jackson
- check property type is XA_CARDINAL
- drop a useless memcpy()

Weston Bug: https://phabricator.freedesktop.org/T7622
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-23 13:30:30 -05:00
..
dmx dmx: fix linking 2017-02-08 12:03:08 -05:00
kdrive kdrive: Remove non-evdev input drivers 2017-01-19 18:07:03 -05:00
vfb Remove fd_set from Block/Wakeup handler API 2016-07-18 15:27:51 -04:00
xfree86 xfree86: Reorganize the reserved ScrnInfoRec slots 2017-02-16 11:35:03 -05:00
xnest dix: Rename (and retype) PixmapPerDepth[1] to defaultStipple 2016-12-12 14:09:59 -05:00
xquartz ddx: add new call to purge input devices that weren't added 2016-10-26 15:35:07 +10:00
xwayland xwayland: use _XWAYLAND_ALLOW_COMMITS property 2017-02-23 13:30:30 -05:00
xwin shadow: Macro cleanup 2016-12-12 14:10:44 -05:00
Makefile.am Xwayland DDX 2014-04-03 15:19:22 -07:00