Switch sequence comparisons to handle 32-bit sequence number wrap.
authorKeith Packard <keithp@neko.keithp.com>
Sat, 1 Jul 2006 07:16:07 +0000 (00:16 -0700)
committerKeith Packard <keithp@neko.keithp.com>
Sat, 1 Jul 2006 07:16:07 +0000 (00:16 -0700)
commitdb2504130bc450bd328830060cb3a243dd06b52f
tree7c92afa9d1d6e21c6aa851bac7dda718fc5c6969
parent75fead5b868a0dfdc9e6fd5ef0dd37eb71761312
Switch sequence comparisons to handle 32-bit sequence number wrap.

Create a macro, XCB_SEQUENCE_COMPARE, that accepts two sequence numbers and
a comparison operator and correctly handles 32-bit wrap around.
Rewrite all ordered sequence number comparisons to use this macro.
Also, caught one error where a sequence was stored in a signed int variable.
Push out a GetInputFocus request when the sequence number does wrap at 32
bits so that applications cannot see sequence 0 (as that is an error
indicator).
src/xcb_in.c
src/xcb_out.c
src/xcbint.h