add a var to track errors
This commit is contained in:
parent
475fb805f2
commit
f154f7b548
2 changed files with 5 additions and 0 deletions
|
@ -3,9 +3,11 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
static gboolean xerror_ignore = FALSE;
|
static gboolean xerror_ignore = FALSE;
|
||||||
|
gboolean xerror_occured = FALSE;
|
||||||
|
|
||||||
int xerror_handler(Display *d, XErrorEvent *e)
|
int xerror_handler(Display *d, XErrorEvent *e)
|
||||||
{
|
{
|
||||||
|
xerror_occured = TRUE;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (!xerror_ignore) {
|
if (!xerror_ignore) {
|
||||||
char errtxt[128];
|
char errtxt[128];
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
/* can be used to track errors */
|
||||||
|
extern gboolean xerror_occured;
|
||||||
|
|
||||||
int xerror_handler(Display *, XErrorEvent *);
|
int xerror_handler(Display *, XErrorEvent *);
|
||||||
|
|
||||||
void xerror_set_ignore(gboolean ignore);
|
void xerror_set_ignore(gboolean ignore);
|
||||||
|
|
Loading…
Reference in a new issue