diff options
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xfaces.c | 19 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b001c4eec0b..cf1a81b1612 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-05-29 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * xfaces.c (free_realized_faces): Block/unblock input. | ||
| 4 | (free_realized_multibyte_face): Ditto. | ||
| 5 | |||
| 1 | 2000-05-29 Dave Love <fx@gnu.org> | 6 | 2000-05-29 Dave Love <fx@gnu.org> |
| 2 | 7 | ||
| 3 | * textprop.c (Qkeymap): New variable. | 8 | * textprop.c (Qkeymap): New variable. |
| @@ -20,7 +25,7 @@ | |||
| 20 | (get_local_map): Extra arg using it. | 25 | (get_local_map): Extra arg using it. |
| 21 | (Qkeymap): Declare. | 26 | (Qkeymap): Declare. |
| 22 | 27 | ||
| 23 | * lisp.h: (get_local_map: Don't declare here. | 28 | * lisp.h (get_local_map): Don't declare here. |
| 24 | 29 | ||
| 25 | 2000-05-29 Kenichi Handa <handa@etl.go.jp> | 30 | 2000-05-29 Kenichi Handa <handa@etl.go.jp> |
| 26 | 31 | ||
diff --git a/src/xfaces.c b/src/xfaces.c index d63c8212f8c..f39a2936b6e 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -4663,6 +4663,11 @@ free_realized_faces (c) | |||
| 4663 | int i, size; | 4663 | int i, size; |
| 4664 | struct frame *f = c->f; | 4664 | struct frame *f = c->f; |
| 4665 | 4665 | ||
| 4666 | /* We must block input here because we can't process X events | ||
| 4667 | safely while only some faces are freed, or when the frame's | ||
| 4668 | current matrix still references freed faces. */ | ||
| 4669 | BLOCK_INPUT; | ||
| 4670 | |||
| 4666 | for (i = 0; i < c->used; ++i) | 4671 | for (i = 0; i < c->used; ++i) |
| 4667 | { | 4672 | { |
| 4668 | free_realized_face (f, c->faces_by_id[i]); | 4673 | free_realized_face (f, c->faces_by_id[i]); |
| @@ -4682,6 +4687,8 @@ free_realized_faces (c) | |||
| 4682 | clear_current_matrices (f); | 4687 | clear_current_matrices (f); |
| 4683 | ++windows_or_buffers_changed; | 4688 | ++windows_or_buffers_changed; |
| 4684 | } | 4689 | } |
| 4690 | |||
| 4691 | UNBLOCK_INPUT; | ||
| 4685 | } | 4692 | } |
| 4686 | } | 4693 | } |
| 4687 | 4694 | ||
| @@ -4698,6 +4705,11 @@ free_realized_multibyte_face (f, fontset) | |||
| 4698 | struct face *face; | 4705 | struct face *face; |
| 4699 | int i; | 4706 | int i; |
| 4700 | 4707 | ||
| 4708 | /* We must block input here because we can't process X events safely | ||
| 4709 | while only some faces are freed, or when the frame's current | ||
| 4710 | matrix still references freed faces. */ | ||
| 4711 | BLOCK_INPUT; | ||
| 4712 | |||
| 4701 | for (i = 0; i < cache->used; i++) | 4713 | for (i = 0; i < cache->used; i++) |
| 4702 | { | 4714 | { |
| 4703 | face = cache->faces_by_id[i]; | 4715 | face = cache->faces_by_id[i]; |
| @@ -4709,11 +4721,18 @@ free_realized_multibyte_face (f, fontset) | |||
| 4709 | free_realized_face (f, face); | 4721 | free_realized_face (f, face); |
| 4710 | } | 4722 | } |
| 4711 | } | 4723 | } |
| 4724 | |||
| 4725 | /* Must do a thorough redisplay the next time. Mark current | ||
| 4726 | matrices as invalid because they will reference faces freed | ||
| 4727 | above. This function is also called when a frame is destroyed. | ||
| 4728 | In this case, the root window of F is nil. */ | ||
| 4712 | if (WINDOWP (f->root_window)) | 4729 | if (WINDOWP (f->root_window)) |
| 4713 | { | 4730 | { |
| 4714 | clear_current_matrices (f); | 4731 | clear_current_matrices (f); |
| 4715 | ++windows_or_buffers_changed; | 4732 | ++windows_or_buffers_changed; |
| 4716 | } | 4733 | } |
| 4734 | |||
| 4735 | UNBLOCK_INPUT; | ||
| 4717 | } | 4736 | } |
| 4718 | 4737 | ||
| 4719 | 4738 | ||