Skip to content
  • Keith Packard's avatar
    Xext/saver: Swap ScreenSaverSuspend 'suspend' field. Handle old XCB clients. · 52048ce2
    Keith Packard authored
    
    
    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 compare all 32-bits against zero so that it works with
    both new and old clients.
    
    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).
    
    Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
    Reviewed-by: default avatarMihai Moldovan <ionic@ionic.de>
    Reviewed-by: default avatarAdam Jackson <ajax@redhat.com>
    52048ce2