]> Dogcows Code - chaz/openbox/commitdiff
put xerrors in the debug output when they are being ignored
authorDana Jansens <danakj@orodu.net>
Sun, 27 May 2007 22:39:57 +0000 (22:39 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 27 May 2007 22:39:57 +0000 (22:39 +0000)
openbox/xerror.c

index 3de593b8f6765e11bb7a49a8258fa06c2729496d..14c0ecd617759f87cb956898445a1360f355ffd8 100644 (file)
@@ -27,20 +27,22 @@ gboolean xerror_occured = FALSE;
 
 gint xerror_handler(Display *d, XErrorEvent *e)
 {
-    xerror_occured = TRUE;
 #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)
             /*g_message(_("X Error: %s\n"), errtxt)*/;
         else
             g_error(_("X Error: %s"), errtxt);
-    }
+    } else
+        ob_debug("XError code %d '%s'\n", e->error_code, errtxt);
 #else
     (void)d; (void)e;
 #endif
+
+    xerror_occured = TRUE;
     return 0;
 }
 
This page took 0.026631 seconds and 4 git commands to generate.