summaryrefslogtreecommitdiff
path: root/src/xftfont.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2009-05-11 09:30:34 +0000
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2009-05-11 09:30:34 +0000
commit9cb363dbdae22fb8e00a400516da140d62434a3d (patch)
tree592865a3779979ae9cf0196b43c8b4364230f600 /src/xftfont.c
parent47a6002f34c4ae913fc696cfeb7d09c645040492 (diff)
downloademacs-9cb363dbdae22fb8e00a400516da140d62434a3d.tar.gz
(xftfont_open): Make sure that Xrender extension is added
before Xft one (Bug#1696).
Diffstat (limited to 'src/xftfont.c')
-rw-r--r--src/xftfont.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xftfont.c b/src/xftfont.c
index af0feb9b7e6..4a1b488bcf9 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -274,6 +274,16 @@ xftfont_open (f, entity, pixel_size)
BLOCK_INPUT;
+ /* Make sure that the Xrender extension is added before the Xft one.
+ Otherwise, the close-display hook set by Xft is called after the
+ one for Xrender, and the former tries to re-add the latter. This
+ results in inconsistency of internal states and leads to X
+ protocol error when one reconnects to the same X server.
+ (Bug#1696) */
+ {
+ int event_base, error_base;
+ XRenderQueryExtension (display, &event_base, &error_base);
+ }
match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result);
FcPatternDestroy (pat);
xftfont = XftFontOpenPattern (display, match);