diff options
| author | YAMAMOTO Mitsuharu | 2009-05-11 09:30:34 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2009-05-11 09:30:34 +0000 |
| commit | 9cb363dbdae22fb8e00a400516da140d62434a3d (patch) | |
| tree | 592865a3779979ae9cf0196b43c8b4364230f600 /src | |
| parent | 47a6002f34c4ae913fc696cfeb7d09c645040492 (diff) | |
| download | emacs-9cb363dbdae22fb8e00a400516da140d62434a3d.tar.gz emacs-9cb363dbdae22fb8e00a400516da140d62434a3d.zip | |
(xftfont_open): Make sure that Xrender extension is added
before Xft one (Bug#1696).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/xftfont.c | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4e774d027f0..e4afbc9298a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,9 @@ | |||
| 3 | * gtkutil.c (xg_frame_set_char_size): Set frame pixel width/height to | 3 | * gtkutil.c (xg_frame_set_char_size): Set frame pixel width/height to |
| 4 | what we expect to get in the next ConfigureNotify event. | 4 | what we expect to get in the next ConfigureNotify event. |
| 5 | 5 | ||
| 6 | * xftfont.c (xftfont_open): Make sure that Xrender extension is added | ||
| 7 | before Xft one (Bug#1696). | ||
| 8 | |||
| 6 | 2009-05-07 David Reitter <david.reitter@gmail.com> | 9 | 2009-05-07 David Reitter <david.reitter@gmail.com> |
| 7 | 10 | ||
| 8 | * nsfns.m (Fx_display_planes): Compute bitplanes using | 11 | * nsfns.m (Fx_display_planes): Compute bitplanes using |
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) | |||
| 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); |