[PATCH] Pack swap complete bits into an XEvent

Keith Packard keithp at keithp.com
Thu Apr 28 15:01:16 PDT 2011


On Thu, 28 Apr 2011 13:27:19 -0700, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> The defintion of the swap complete event was wrong; XEvents are only 32
> bytes long, and with padding the swap event was longer.  So use some
> creative packing to get all the bits we want transmitted.  Requires a
> proto version bump.

If you've got a proto version on both sides, you should just stick the
low 32 bits in place of the event type and pad fields, rather than
abusing. Yes, this requires two different structures in the X server,
but you need to do that anyways -- the event type has to shrink from 16
bits to 8 bits, moving it at the same time is not a problem.

Besides, this will make the xcb case really ugly as xcb doesn't hide the
protocol event structures from the application.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20110428/1bacbf2d/attachment.pgp>


More information about the dri-devel mailing list