Skip to content

Commit 2322325

Browse files
committed
Make BadAtom errors non-fatal
1 parent 869dc90 commit 2322325

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

highlight-pointer.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,10 @@ int xerror_handler(Display* dpy_p, XErrorEvent* err) {
608608
fprintf(stderr, "Key combination already grabbed by a different process\n");
609609
exit(1);
610610
}
611+
if (err->error_code == BadAtom) {
612+
fprintf(stderr, "X warning: BadAtom for %d-%d\n", err->request_code, err->minor_code);
613+
return 0;
614+
}
611615
char buf[1024];
612616
XGetErrorText(dpy_p, err->error_code, buf, 1024);
613617
fprintf(stderr, "X error: %s\n", buf);

0 commit comments

Comments
 (0)