put xerrors in the debug output when they are being ignored

This commit is contained in:
Dana Jansens 2007-05-27 22:39:57 +00:00
parent 65bf23c27d
commit 5395d30623

View file

@ -27,20 +27,22 @@ gboolean xerror_occured = FALSE;
gint xerror_handler(Display *d, XErrorEvent *e) gint xerror_handler(Display *d, XErrorEvent *e)
{ {
xerror_occured = TRUE;
#ifdef DEBUG #ifdef DEBUG
if (!xerror_ignore) {
gchar errtxt[128]; gchar errtxt[128];
XGetErrorText(d, e->error_code, errtxt, 127); XGetErrorText(d, e->error_code, errtxt, 127);
if (!xerror_ignore) {
if (e->error_code == BadWindow) if (e->error_code == BadWindow)
/*g_message(_("X Error: %s\n"), errtxt)*/; /*g_message(_("X Error: %s\n"), errtxt)*/;
else else
g_error(_("X Error: %s"), errtxt); g_error(_("X Error: %s"), errtxt);
} } else
ob_debug("XError code %d '%s'\n", e->error_code, errtxt);
#else #else
(void)d; (void)e; (void)d; (void)e;
#endif #endif
xerror_occured = TRUE;
return 0; return 0;
} }