[PATCH xserver] Xext/saver: Swap ScreenSaverSuspend 'suspend' field. Handle old XCB clients.

Mihai Moldovan ionic at ionic.de
Tue Mar 13 08:48:03 UTC 2018


* On 03/12/2018 08:27 PM, Keith Packard wrote:
> This field was defined as a Bool in the protocol headers and BOOL in
> xcb. Bool is not a valid type for protocol fields. It is defined as
> 'int' by Xdefs.h, which we expect to be 32-bits on all machines.
> 
> The protocol headers and xcb have patches posted to switch to CARD32,
> which is at least well defined.
> 
> This change adds the necessary byte swapping to handle other-endian
> clients with this 32-bit field, and then changes the request
> processing to use only the low byte of that value so that older XCB
> clients will continue to work properly, at least on LSB machines.
> 
> On MSB machines, Xlib will continue to work properly, but old XCB will
> not interoperate with the X server (either before or after this patch).

An actual matrix for this would be

C -> S |       old server         |       new server
       | Xlib | old xcb | new xcb | Xlib | old xcb | new xcb
------------------------------------------------------------
l -> l |   X  |    X    |    X    |   X  |    X    |    X
l -> B |   -  |    -    |    -    |   X  |    X    |    X
B -> l |   -  |    X    |    -    |   X  |    -    |    X
B -> B |   X  |    -    |    X    |   X  |    -    |    X


Too complicated to fully transcribe into words as part of a commit message, I'd say.


The actual changes (both server and proto) LGTM.



Mihai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: OpenPGP digital signature
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180313/0ee4ee7a/attachment.sig>


More information about the xorg-devel mailing list