+xerror(Display *d, XErrorEvent *ee)
+{
+#ifdef SWM_DEBUG
+ char error_text[1024];
+ XGetErrorText(display, ee->error_code, error_text, sizeof(error_text));
+ DNPRINTF(SWM_D_MISC, "xerror: error_code: %u, error_text: %s\n",
+ ee->error_code, error_text);
+#endif
+ return -1;
+}
+