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:
parent
a6b63cd035
commit
eabe2b5bb8
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue