X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Frootwin.c;fp=ioncore%2Frootwin.c;h=fd2d2584d054fc68aa0e4b88915599d4488372ed;hp=1468302c56bf7aea60521c6ce6442ab25fe251d3;hb=2948134dc6273f6d3ea089c4cc273b69e2f8d51e;hpb=69ec7e63f6c39c98c82e8878e672215792ecfd7b diff --git a/ioncore/rootwin.c b/ioncore/rootwin.c index 1468302..fd2d258 100644 --- a/ioncore/rootwin.c +++ b/ioncore/rootwin.c @@ -59,9 +59,13 @@ static int my_error_handler(Display *dpy, XErrorEvent *ev) /* Just ignore bad window and similar errors; makes the rest of * the code simpler. + * + * Apparently XGetWindowProperty can return BadMatch on a race + * condition where the server is already reusing the XID for a + * non-window drawable, so let's just ignore BadMatch entirely... */ if((ev->error_code==BadWindow || - (ev->error_code==BadMatch && ev->request_code==X_SetInputFocus) || + (ev->error_code==BadMatch /*&& ev->request_code==X_SetInputFocus*/) || (ev->error_code==BadDrawable && ev->request_code==X_GetGeometry)) && ignore_badwindow) return 0;