cant run wine at all dammit
g.patel at wanadoo.fr
g.patel at wanadoo.fr
Fri Apr 27 06:41:55 CDT 2001
On Fri, 27 Apr 2001 17:32:03 +1000, "Michael Pearce"
<chuzwuzza at ematic.com> wrote:
>i used to be able to run wine perfectly, before i reinstalled debian (long story)
>
>now ive tried compiling the winehq.com CVS source, the transgaming CVS
>source, and the latest official release, but whenever i run ANYTHING at
>all, before it even gets a chance to start up, it kills X, and drops me
>back to teh console.
<snip font loading>
I wonder if this patch could do any difference.
Gerard
--- xfont.c.orig Wed Jan 24 23:15:32 2001
+++ xfont.c Sun Jan 28 22:04:06 2001
@@ -1867,6 +1867,32 @@
#undef df
}
+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(display, lpstr);
+ XSync(display, False);
+ XSetErrorHandler(ptr);
+ wine_tsx11_unlock();
+ if (staticXError)
+ return NULL;
+ else
+ return x_fs;
+}
+
/***********************************************************************
* XFONT_BuildMetrics
*
@@ -1971,7 +1997,7 @@
}
else lpstr = x_pattern[i];
- if( (x_fs = TSXLoadQueryFont(display, lpstr)) )
+ if( (x_fs = XFONT_GetFont(lpstr)) )
{
XFONT_SetFontMetric( fi, fr, x_fs );
TSXFreeFont( display, x_fs );
More information about the wine-users
mailing list