X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ioncore%2Frootwin.c;h=fd2d2584d054fc68aa0e4b88915599d4488372ed;hb=29aae1975d46f66b97a2b873f1875eded8c6fbc3;hp=f9b6905f29787db44c07e361812ecc8430825f69;hpb=ae4260bb64817c11f9a7140324cd3e3ba113e297;p=ion3.git diff --git a/ioncore/rootwin.c b/ioncore/rootwin.c index f9b6905..fd2d258 100644 --- a/ioncore/rootwin.c +++ b/ioncore/rootwin.c @@ -1,7 +1,7 @@ /* * ion/ioncore/rootwin.c * - * Copyright (c) Tuomo Valkonen 1999-2007. + * Copyright (c) Tuomo Valkonen 1999-2008. * * See the included file LICENSE for details. */ @@ -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;