Tried a different tack ....
gerard patel
g.patel at wanadoo.fr.invalid
Fri Oct 5 03:42:17 CDT 2001
On Thu, 4 Oct 2001 18:09:13 -0700, Phil Stracchino <alaric at babcom.com>
wrote:
>Building font metrics. This may take some time...
>0806db50:Call user32.MessageBoxA(00000000,40474924 "Unhandled exception
>0x80000003 at address 0x405e4793.\nDo you wish to debug it ?",400fe347
>"Exception raised",00000014) ret=400dfc66
>err:win:GetDesktopWindow You need the -desktop option when running with native USER
<snip>
Ah yes, I think I see what happens...
There is an old problem with fonts that I had never the time
to handle. This causes an X error. When displaying the error,
Wine can (optionally) display a message in a message box
(the default is a printf on the console). If it tries to display
the error message in a message box, it is trying to access X
while X is locked -> Bad.
To get back to the (probable) cause of the problem :
--- xfont.c.orig Thu Sep 13 19:49:04 2001
+++ xfont.c Fri Oct 5 08:32:53 2001
@@ -1863,6 +1863,33 @@
return buffer;
}
+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;
+}
+
/***********************************************************************
* X Font Matching
@@ -2074,7 +2101,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 );
HTH
Gerard
More information about the wine-users
mailing list