Andrew Nguyen : winex11.drv: Use a separate string buffer for X11R6 font check.
Alexandre Julliard
julliard at winehq.org
Mon Oct 11 13:15:14 CDT 2010
Module: wine
Branch: master
Commit: 093ae8b691a9fc295eb806164d377a072477a810
URL: http://source.winehq.org/git/wine.git/?a=commit;h=093ae8b691a9fc295eb806164d377a072477a810
Author: Andrew Nguyen <anguyen at codeweavers.com>
Date: Mon Oct 11 05:19:19 2010 -0500
winex11.drv: Use a separate string buffer for X11R6 font check.
---
dlls/winex11.drv/xfont.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/winex11.drv/xfont.c b/dlls/winex11.drv/xfont.c
index aa3eb76..374590b 100644
--- a/dlls/winex11.drv/xfont.c
+++ b/dlls/winex11.drv/xfont.c
@@ -2893,7 +2893,8 @@ static void X11DRV_FONT_InitX11Metrics( void )
int i, x_count, buf_size;
char *buffer;
HKEY hkey;
-
+ XFontStruct* x_fs;
+ char fontcheck_name[] = "-*-*-*-*-normal-*-[12 0 0 12]-*-72-*-*-*-iso8859-1";
wine_tsx11_lock();
x_pattern = XListFonts(gdi_display, "*", MAX_FONTS, &x_count );
@@ -2966,15 +2967,12 @@ static void X11DRV_FONT_InitX11Metrics( void )
XFreeFontNames(x_pattern);
/* check if we're dealing with X11 R6 server */
+ if( (x_fs = safe_XLoadQueryFont(gdi_display, fontcheck_name)) )
{
- XFontStruct* x_fs;
- strcpy(buffer, "-*-*-*-*-normal-*-[12 0 0 12]-*-72-*-*-*-iso8859-1");
- if( (x_fs = safe_XLoadQueryFont(gdi_display, buffer)) )
- {
- text_caps |= TC_SF_X_YINDEP;
- XFreeFont(gdi_display, x_fs);
- }
+ text_caps |= TC_SF_X_YINDEP;
+ XFreeFont(gdi_display, x_fs);
}
+
wine_tsx11_unlock();
HeapFree(GetProcessHeap(), 0, buffer);
More information about the wine-cvs
mailing list