1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

Explicitly cast X sequence number

Fix an undefined behavior.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2018-12-17 00:45:13 +00:00
parent a6b63cd035
commit eabe2b5bb8
No known key found for this signature in database
GPG key ID: 37C999F617EA1A47

View file

@ -1936,7 +1936,9 @@ ev_handle(session_t *ps, xcb_generic_event_t *ev) {
// proc might also just be Xlib internal event processing functions, and // proc might also just be Xlib internal event processing functions, and
// because they probably won't see all X replies, they will complain about // because they probably won't see all X replies, they will complain about
// missing sequence numbers. // missing sequence numbers.
ev->sequence = LastKnownRequestProcessed(ps->dpy); //
// We only need the low 16 bits
ev->sequence = (uint16_t)(LastKnownRequestProcessed(ps->dpy) & 0xffff);
proc(ps->dpy, &dummy, (xEvent *)ev); proc(ps->dpy, &dummy, (xEvent *)ev);
} }