Return an appropriately-typed error from dixLookupResourceByType.
Rather than always returning BadValue, associate an error status like BadWindow with a resource type like RT_WINDOW, and return the appropriate one for the requested type. This patch only touches the core protocol resource types. Others still return BadValue and need to be mapped appropriately. dixLookupResourceByType can now return BadImplementation, if the caller asked for a resource type that has not been allocated in the server. Signed-off-by: Jamey Sharp <email@example.com> Reviewed-by: Adam Jackson <firstname.lastname@example.org>
Showing with 124 additions and 93 deletions