add glx_error_abort

This commit is contained in:
David Rose 2004-01-26 15:43:28 +00:00
parent 13d1f95326
commit 7bf1df25be
3 changed files with 6 additions and 0 deletions

View File

@ -56,3 +56,4 @@ init_libglxdisplay() {
} }
const string display_cfg = config_glxdisplay.GetString("display", ""); const string display_cfg = config_glxdisplay.GetString("display", "");
const bool glx_error_abort = config_glxdisplay.GetBool("glx-error-abort", false);

View File

@ -27,5 +27,6 @@ NotifyCategoryDecl(glxdisplay, EXPCL_PANDAGL, EXPTP_PANDAGL);
extern EXPCL_PANDAGL void init_libglxdisplay(); extern EXPCL_PANDAGL void init_libglxdisplay();
extern const string display_cfg; extern const string display_cfg;
extern const bool glx_error_abort;
#endif /* __CONFIG_GLXDISPLAY_H__ */ #endif /* __CONFIG_GLXDISPLAY_H__ */

View File

@ -545,6 +545,10 @@ error_handler(Display *display, XErrorEvent *error) {
glxdisplay_cat.error() glxdisplay_cat.error()
<< msg << "\n"; << msg << "\n";
if (glx_error_abort) {
abort();
}
// We return to allow the application to continue running, unlike // We return to allow the application to continue running, unlike
// the default X error handler which exits. // the default X error handler which exits.
return 0; return 0;