I changed it to 32 bits because (at least) RANDR uses 32 bits for each version number [1]:
RRQueryVersion client-major-version: CARD32 client-minor-version: CARD32 ▶ major-version: CARD32 minor-version: CARD32 This was the request I was sending where X said it supported RANDR 4294967295.4294967295. [1] http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt On Fri, May 23, 2014 at 1:05 PM, Keith Packard <[email protected]> wrote: > Robert Ancell <[email protected]> writes: > >> The easiest way to check for the version of an extension is to send the >> maximum >> possible version numbers in the QueryVersion request. The X server overflows >> on >> these as it assumes you will send a reasonable version number. >> --- >> include/misc.h | 18 +++++++++++------- >> 1 file changed, 11 insertions(+), 7 deletions(-) >> >> diff --git a/include/misc.h b/include/misc.h >> index 17de710..9c2f573 100644 >> --- a/include/misc.h >> +++ b/include/misc.h >> @@ -259,15 +259,19 @@ extern void FormatDouble(double dbl, char *string); >> * or a value greater than 0 >> */ >> static inline int >> -version_compare(uint16_t a_major, uint16_t a_minor, >> - uint16_t b_major, uint16_t b_minor) >> +version_compare(uint32_t a_major, uint32_t a_minor, >> + uint32_t b_major, uint32_t b_minor) > > I don't see any particular reason to change the signature of this > function; the rest of the rewrite should work with 16-bit ints. > >> { >> - int a, b; > > Just changing these to uint32_t and fixing the test to > > if (a > b) > return 1; > if (a < b) > return -1; > return 0; > > would suffice, assuming everything is 16-bit ints. > > -- > [email protected] _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
