X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Frootwin.c;h=c206e3d9587ac56ae55c1042f051a9a24b438435;hp=a1db7203c4c821961108d5af9ee307e3c3b39614;hb=e3aec18706513a87eaa7839dfdaf7e0fcd0d8d2a;hpb=de22e45179cb3bafa490294d31d47f361047a30a diff --git a/ioncore/rootwin.c b/ioncore/rootwin.c index a1db720..c206e3d 100644 --- a/ioncore/rootwin.c +++ b/ioncore/rootwin.c @@ -1,12 +1,9 @@ /* * ion/ioncore/rootwin.c * - * Copyright (c) Tuomo Valkonen 1999-2007. + * Copyright (c) Tuomo Valkonen 1999-2009. * - * Ion is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. + * See the included file LICENSE for details. */ #include @@ -62,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;