diff options
Diffstat (limited to 'app-emulation/wine/files/wine-20030411-xopenfont.patch')
-rw-r--r-- | app-emulation/wine/files/wine-20030411-xopenfont.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/app-emulation/wine/files/wine-20030411-xopenfont.patch b/app-emulation/wine/files/wine-20030411-xopenfont.patch new file mode 100644 index 000000000000..7f83e11ba4e9 --- /dev/null +++ b/app-emulation/wine/files/wine-20030411-xopenfont.patch @@ -0,0 +1,45 @@ +--- graphics/x11drv/xfont.c.orig 2003-04-06 18:27:44.000000000 +0200 ++++ graphics/x11drv/xfont.c 2003-04-06 18:27:58.000000000 +0200 +@@ -2115,7 +2115,7 @@ + } + else lpstr = x_pattern[i]; + +- if( (x_fs = TSXLoadQueryFont(gdi_display, lpstr)) ) ++ if( (x_fs = XFONT_GetFont(lpstr)) ) + { + XFONT_SetFontMetric( fi, fr, x_fs ); + TSXFreeFont( gdi_display, x_fs ); +@@ -3239,6 +3239,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 **************************************************** |