@@ -56,3 +56,4 @@ init_libglxdisplay() {
}
const string display_cfg = config_glxdisplay.GetString("display", "");
+const bool glx_error_abort = config_glxdisplay.GetBool("glx-error-abort", false);
@@ -27,5 +27,6 @@ NotifyCategoryDecl(glxdisplay, EXPCL_PANDAGL, EXPTP_PANDAGL);
extern EXPCL_PANDAGL void init_libglxdisplay();
extern const string display_cfg;
+extern const bool glx_error_abort;
#endif /* __CONFIG_GLXDISPLAY_H__ */
@@ -545,6 +545,10 @@ error_handler(Display *display, XErrorEvent *error) {
glxdisplay_cat.error()
<< msg << "\n";
+ if (glx_error_abort) {
+ abort();
+ }
+
// We return to allow the application to continue running, unlike
// the default X error handler which exits.
return 0;