warn() on XErrors

This commit is contained in:
Julien Danjou 2008-01-25 00:07:16 +01:00
parent 652c1459ba
commit dcde59df02
1 changed files with 1 additions and 0 deletions

View File

@ -175,6 +175,7 @@ exit_on_signal(int sig __attribute__ ((unused)))
static int static int
xerror(Display * edpy, XErrorEvent * ee) xerror(Display * edpy, XErrorEvent * ee)
{ {
warn("an XError occured, this may be bad\n");
if(ee->error_code == BadWindow if(ee->error_code == BadWindow
|| (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch) || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch)
|| (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable) || (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable)