Commit e47ac35d authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

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

parent ebc2b778
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* Copyright 1994 Alexandre Julliard * Copyright 1994 Alexandre Julliard
*/ */
#include <signal.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
...@@ -979,6 +980,12 @@ static void called_at_exit(void) ...@@ -979,6 +980,12 @@ static void called_at_exit(void)
DeleteCriticalSection( HEAP_SystemLock ); 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 * MAIN_WineInit
* *
...@@ -1021,6 +1028,8 @@ BOOL32 MAIN_WineInit( int *argc, char *argv[] ) ...@@ -1021,6 +1028,8 @@ BOOL32 MAIN_WineInit( int *argc, char *argv[] )
MAIN_ParseOptions( argc, argv ); MAIN_ParseOptions( argc, argv );
if (Options.synchronous) XSetErrorHandler( WINE_X11_ErrorHandler );
if (Options.desktopGeometry && Options.managed) if (Options.desktopGeometry && Options.managed)
{ {
#if 0 #if 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment