Logo Search packages:      
Sourcecode: dfm version File versions  Download package

handler.c

/**************************************************************
  (C) 1997 by Achim Kaiser

  You may distribute under the terms of the GNU General Public
  License as specified in the COPYING file.
**************************************************************/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "global.h"
#include "handler.h"
#include <stdio.h>

int myhandler(Display* mydisplay,XErrorEvent* myerr)
{
  char msg[80];
  XGetErrorText(mydisplay,myerr->error_code,msg,80);
  fprintf(stderr,"dfm: Error code \"%s\" ignored!\n",msg);
  return 0;
}

void IgnoreErrorOn()
{
  XSetErrorHandler(myhandler);
}

void IgnoreErrorOff()
{
  XFlush(GetDisplay());
  /*XSetErrorHandler(None);*/
}

Generated by  Doxygen 1.6.0   Back to index