comparison src/xftfont.c @ 103199:3b14cedd241f

(xftfont_open): Make sure that Xrender extension is added before Xft one (Bug#1696).
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Mon, 11 May 2009 09:29:49 +0000
parents 64cdf8a83bdd
children e561e9f73ad4
comparison
equal deleted inserted replaced
103198:f63bce93c7a1 103199:3b14cedd241f
272 FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename)); 272 FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename));
273 FcPatternAddInteger (pat, FC_INDEX, XINT (index)); 273 FcPatternAddInteger (pat, FC_INDEX, XINT (index));
274 274
275 275
276 BLOCK_INPUT; 276 BLOCK_INPUT;
277 /* Make sure that the Xrender extension is added before the Xft one.
278 Otherwise, the close-display hook set by Xft is called after the
279 one for Xrender, and the former tries to re-add the latter. This
280 results in inconsistency of internal states and leads to X
281 protocol error when one reconnects to the same X server.
282 (Bug#1696) */
283 {
284 int event_base, error_base;
285 XRenderQueryExtension (display, &event_base, &error_base);
286 }
277 match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result); 287 match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result);
278 FcPatternDestroy (pat); 288 FcPatternDestroy (pat);
279 xftfont = XftFontOpenPattern (display, match); 289 xftfont = XftFontOpenPattern (display, match);
280 ft_face = XftLockFace (xftfont); 290 ft_face = XftLockFace (xftfont);
281 UNBLOCK_INPUT; 291 UNBLOCK_INPUT;