Skip to content
  • Adam Jackson's avatar
    drisw: Try harder to probe whether MIT-SHM works · 52426ce4
    Adam Jackson authored
    
    
    XQueryExtension merely tells you whether the extension exists, it
    doesn't tell you whether you're local enough for it to work.
    XShmQueryVersion is not enough to discover this either, you need to
    provoke the server to do actual work, and if it thinks you're remote it
    will throw BadRequest at you. So send an invalid ShmDetach and use the
    error code to distinguish local from remote.
    
    [airlied: fixed bug not resetting xshm_error to 0 on success,
    which made later stuff fail completely.]
    
    Reviewed-by: default avatarEric Anholt <eric@anholt.net>
    Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
    Signed-off-by: default avatarAdam Jackson <ajax@redhat.com>
    52426ce4