diff options
| author | Stefan Monnier | 2009-05-06 02:57:47 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-05-06 02:57:47 +0000 |
| commit | ba98e3a0fffe915d4f3a94c1c3bf69f05cc812b9 (patch) | |
| tree | 879fa57bfb067c76970729d3377e0ec10a79f0bd /src | |
| parent | 834cf4368cc72709be4b4d656a5a835924cd14ef (diff) | |
| download | emacs-ba98e3a0fffe915d4f3a94c1c3bf69f05cc812b9.tar.gz emacs-ba98e3a0fffe915d4f3a94c1c3bf69f05cc812b9.zip | |
(font_update_drivers): Sanity fallback to avoid disabling all drivers.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/font.c | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b3f5bb483fa..5f41bd894f4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2009-05-06 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2009-05-06 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * font.c (font_update_drivers): Sanity fallback to avoid disabling | ||
| 4 | all drivers. | ||
| 5 | |||
| 3 | * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUStep. | 6 | * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUStep. |
| 4 | 7 | ||
| 5 | 2009-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 8 | 2009-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
diff --git a/src/font.c b/src/font.c index 16ae9cdc0f4..cdff0d678e6 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -3655,6 +3655,23 @@ font_update_drivers (f, new_drivers) | |||
| 3655 | next = &(*next)->next; | 3655 | next = &(*next)->next; |
| 3656 | } | 3656 | } |
| 3657 | *next = NULL; | 3657 | *next = NULL; |
| 3658 | |||
| 3659 | if (! f->font_driver_list->on) | ||
| 3660 | { /* None of the drivers is enabled: enable them all. | ||
| 3661 | Happens if you set the list of drivers to (xft x) in your .emacs | ||
| 3662 | and then use it under w32 or ns. */ | ||
| 3663 | for (list = f->font_driver_list; list; list = list->next) | ||
| 3664 | { | ||
| 3665 | struct font_driver *driver = list->driver; | ||
| 3666 | eassert (! list->on); | ||
| 3667 | if (! driver->start_for_frame | ||
| 3668 | || driver->start_for_frame (f) == 0) | ||
| 3669 | { | ||
| 3670 | font_prepare_cache (f, driver); | ||
| 3671 | list->on = 1; | ||
| 3672 | } | ||
| 3673 | } | ||
| 3674 | } | ||
| 3658 | } | 3675 | } |
| 3659 | 3676 | ||
| 3660 | for (list = f->font_driver_list; list; list = list->next) | 3677 | for (list = f->font_driver_list; list; list = list->next) |