Own X11 errorhandler to locate X11 errors. Useful only with -sync.

oldstable
Marcus Meissner 1998-11-15 09:17:08 +00:00 committed by Alexandre Julliard
parent ebc2b778d5
commit e47ac35d4b
1 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,7 @@
* Copyright 1994 Alexandre Julliard
*/
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@ -979,6 +980,12 @@ static void called_at_exit(void)
DeleteCriticalSection( HEAP_SystemLock );
}
static int WINE_X11_ErrorHandler(Display *display,XErrorEvent *error_evt)
{
kill( getpid(), SIGHUP ); /* force an entry in the debugger */
return 0;
}
/***********************************************************************
* MAIN_WineInit
*
@ -1021,6 +1028,8 @@ BOOL32 MAIN_WineInit( int *argc, char *argv[] )
MAIN_ParseOptions( argc, argv );
if (Options.synchronous) XSetErrorHandler( WINE_X11_ErrorHandler );
if (Options.desktopGeometry && Options.managed)
{
#if 0