Skip to content

Commit

Permalink
Make BadAtom errors non-fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
swillner committed Mar 17, 2021
1 parent 869dc90 commit 2322325
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions highlight-pointer.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,10 @@ int xerror_handler(Display* dpy_p, XErrorEvent* err) {
fprintf(stderr, "Key combination already grabbed by a different process\n");
exit(1);
}
if (err->error_code == BadAtom) {
fprintf(stderr, "X warning: BadAtom for %d-%d\n", err->request_code, err->minor_code);
return 0;
}
char buf[1024];
XGetErrorText(dpy_p, err->error_code, buf, 1024);
fprintf(stderr, "X error: %s\n", buf);
Expand Down

0 comments on commit 2322325

Please sign in to comment.