core: print error with full_sequence
ev->sequence was just the lower 16 bits of the sequence number. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@@ -297,7 +297,7 @@ void discard_ignore(session_t *ps, unsigned long sequence) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int should_ignore(session_t *ps, unsigned long sequence) {
|
static int should_ignore(session_t *ps, uint32_t sequence) {
|
||||||
if (ps == NULL) {
|
if (ps == NULL) {
|
||||||
// Do not ignore errors until the session has been initialized
|
// Do not ignore errors until the session has been initialized
|
||||||
return false;
|
return false;
|
||||||
@@ -1136,7 +1136,7 @@ void root_damaged(session_t *ps) {
|
|||||||
* Xlib error handler function.
|
* Xlib error handler function.
|
||||||
*/
|
*/
|
||||||
static int xerror(Display attr_unused *dpy, XErrorEvent *ev) {
|
static int xerror(Display attr_unused *dpy, XErrorEvent *ev) {
|
||||||
if (!should_ignore(ps_g, ev->serial)) {
|
if (!should_ignore(ps_g, (uint32_t)ev->serial)) {
|
||||||
x_print_error(ev->serial, ev->request_code, ev->minor_code, ev->error_code);
|
x_print_error(ev->serial, ev->request_code, ev->minor_code, ev->error_code);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1146,8 +1146,9 @@ static int xerror(Display attr_unused *dpy, XErrorEvent *ev) {
|
|||||||
* XCB error handler function.
|
* XCB error handler function.
|
||||||
*/
|
*/
|
||||||
void ev_xcb_error(session_t *ps, xcb_generic_error_t *err) {
|
void ev_xcb_error(session_t *ps, xcb_generic_error_t *err) {
|
||||||
if (!should_ignore(ps, err->sequence)) {
|
if (!should_ignore(ps, err->full_sequence)) {
|
||||||
x_print_error(err->sequence, err->major_code, err->minor_code, err->error_code);
|
x_print_error(err->full_sequence, err->major_code, err->minor_code,
|
||||||
|
err->error_code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user