From e47ac35d4be891469bd3fbb66ac48bf1c512bfa7 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 15 Nov 1998 09:17:08 +0000 Subject: [PATCH] Own X11 errorhandler to locate X11 errors. Useful only with -sync. --- misc/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/main.c b/misc/main.c index a1eb6125b49..2ac1f6e3ee1 100644 --- a/misc/main.c +++ b/misc/main.c @@ -4,6 +4,7 @@ * Copyright 1994 Alexandre Julliard */ +#include #include #include #include @@ -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