--- graphics/x11drv/xfont.c.orig 2003-07-11 22:52:29.000000000 +0200 +++ graphics/x11drv/xfont.c 2003-07-11 23:30:28.000000000 +0200 @@ -3250,6 +3250,33 @@ return NULL; } +static int staticXError; + +static int fonterror_handler(Display *display, + XErrorEvent *error_evt) +{ + ERR("X error %d\n", error_evt->error_code); + return 0; +} + +static XFontStruct * XFONT_GetFont(char *lpstr) +{ + XFontStruct* x_fs; + void *ptr; + + wine_tsx11_lock(); + staticXError = FALSE; + ptr = XSetErrorHandler(fonterror_handler); + x_fs = XLoadQueryFont(gdi_display, lpstr); + XSync(gdi_display, False); + XSetErrorHandler(ptr); + wine_tsx11_unlock(); + if (staticXError) + return NULL; + else + return x_fs; +} + /* X11DRV Interface ****************************************************