diff options
| author | YAMAMOTO Mitsuharu | 2019-06-10 12:55:37 +0900 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2019-06-10 12:57:30 +0900 |
| commit | 82052afb24d29303804443d160a96c99ce4fae1a (patch) | |
| tree | fb49bd63808cbc3b7974e6b7f95b95f286ee7f6a | |
| parent | e4f12a1b1ffba07cc7d6f6e1aec5de9f09af616f (diff) | |
| download | emacs-82052afb24d29303804443d160a96c99ce4fae1a.tar.gz emacs-82052afb24d29303804443d160a96c99ce4fae1a.zip | |
Avoid empty menu bar on Xaw with cairo
* lwlib/lwlib-utils.c (crxft_font_open_name) [USE_CAIRO]: Return NULL if
font extents are bogus.
| -rw-r--r-- | lwlib/lwlib-utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lwlib/lwlib-utils.c b/lwlib/lwlib-utils.c index 2c0a931f9cb..1507b088610 100644 --- a/lwlib/lwlib-utils.c +++ b/lwlib/lwlib-utils.c | |||
| @@ -192,6 +192,11 @@ crxft_font_open_name (Display *dpy, int screen, const char *name) | |||
| 192 | } | 192 | } |
| 193 | FcPatternDestroy (pattern); | 193 | FcPatternDestroy (pattern); |
| 194 | } | 194 | } |
| 195 | if (pub && pub->height <= 0) | ||
| 196 | { | ||
| 197 | crxft_font_close (pub); | ||
| 198 | pub = NULL; | ||
| 199 | } | ||
| 195 | return pub; | 200 | return pub; |
| 196 | } | 201 | } |
| 197 | 202 | ||