add a var to track errors

This commit is contained in:
Dana Jansens 2003-03-29 00:48:52 +00:00
parent 475fb805f2
commit f154f7b548
2 changed files with 5 additions and 0 deletions

View file

@ -3,9 +3,11 @@
#include <X11/Xlib.h>
static gboolean xerror_ignore = FALSE;
gboolean xerror_occured = FALSE;
int xerror_handler(Display *d, XErrorEvent *e)
{
xerror_occured = TRUE;
#ifdef DEBUG
if (!xerror_ignore) {
char errtxt[128];

View file

@ -4,6 +4,9 @@
#include <X11/Xlib.h>
#include <glib.h>
/* can be used to track errors */
extern gboolean xerror_occured;
int xerror_handler(Display *, XErrorEvent *);
void xerror_set_ignore(gboolean ignore);