]> git.decadent.org.uk Git - ion3.git/blobdiff - debian/patches/102_ignore-bad-match.diff
Added workaround for Xorg bug in reporting deleted windows
[ion3.git] / debian / patches / 102_ignore-bad-match.diff
diff --git a/debian/patches/102_ignore-bad-match.diff b/debian/patches/102_ignore-bad-match.diff
new file mode 100644 (file)
index 0000000..4a60cad
--- /dev/null
@@ -0,0 +1,16 @@
+--- ion3.orig/ioncore/rootwin.c
++++ ion3/ioncore/rootwin.c
+@@ -58,10 +58,11 @@
+     static char msg[128], request[64], num[32];
+     
+     /* Just ignore bad window and similar errors; makes the rest of
+-     * the code simpler.
++     * the code simpler.  Due to a Xorg bug, window lookups may fail
++     * with BadMatch instead of BadWindow.
+      */
+     if((ev->error_code==BadWindow ||
+-        (ev->error_code==BadMatch && ev->request_code==X_SetInputFocus) ||
++        ev->error_code==BadMatch ||
+         (ev->error_code==BadDrawable && ev->request_code==X_GetGeometry)) &&
+        ignore_badwindow)
+         return 0;