Mercurial > hg > xemacs-beta
comparison src/frame.c @ 4968:4d35e52790f8
fix crash in glyph-cachels
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-03 Ben Wing <ben@xemacs.org>
* frame.c (Fmake_frame):
* glyphs.c:
* glyphs.c (NUM_PRECACHED_GLYPHS):
* glyphs.c (get_glyph_cachel_index):
* glyphs.c (FROB):
* glyphs.c (mark_glyph_cachels_as_not_updated):
* redisplay.c (regenerate_window):
* redisplay.c (redisplay_window):
When creating a frame, call reset_glyph_cachels on the minibuffer
window as well as the root window. Fixes a crash due to other
glyphs (e.g. the gutter glyph) getting in the glyph cachel before
the pre-cached glyphs that are supposed to have fixed indices
(continuation-glyph, truncation-glyph, etc.).
Add a bunch of asserts to make sure that the glyph cachels always
properly contain the pre-cached glyphs.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 03 Feb 2010 21:06:14 -0600 |
parents | 0d4c9d0f6a8d |
children | 16112448d484 |
comparison
equal
deleted
inserted
replaced
4967:0d4c9d0f6a8d | 4968:4d35e52790f8 |
---|---|
583 else | 583 else |
584 invalid_argument ("Invalid value for `minibuffer'", minibuf); | 584 invalid_argument ("Invalid value for `minibuffer'", minibuf); |
585 | 585 |
586 update_frame_window_mirror (f); | 586 update_frame_window_mirror (f); |
587 | 587 |
588 /* #### Do we need to be calling reset_face_cachels here, and then again | |
589 down below? */ | |
588 if (initialized && !DEVICE_STREAM_P (d)) | 590 if (initialized && !DEVICE_STREAM_P (d)) |
589 { | 591 { |
590 if (!NILP (f->minibuffer_window)) | 592 if (!NILP (f->minibuffer_window)) |
591 reset_face_cachels (XWINDOW (f->minibuffer_window)); | 593 reset_face_cachels (XWINDOW (f->minibuffer_window)); |
592 reset_face_cachels (XWINDOW (f->root_window)); | 594 reset_face_cachels (XWINDOW (f->root_window)); |
640 methods are called because it may potentially call some things itself | 642 methods are called because it may potentially call some things itself |
641 which depend on the normal frame methods having initialized | 643 which depend on the normal frame methods having initialized |
642 things. */ | 644 things. */ |
643 init_frame_toolbars (f); | 645 init_frame_toolbars (f); |
644 #endif | 646 #endif |
647 /* Added this assert recently (2-1-10); seems there should be only | |
648 two windows, root and minibufer. Probably we should just be | |
649 calling reset_*_cachels on the root window directly instead of the | |
650 selected window, but I want to make sure they are always the | |
651 same. --ben */ | |
652 assert (EQ (FRAME_SELECTED_WINDOW (f), f->root_window)); | |
645 reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); | 653 reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); |
646 reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); | 654 reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); |
655 if (!NILP (f->minibuffer_window)) | |
656 { | |
657 reset_face_cachels (XWINDOW (f->minibuffer_window)); | |
658 reset_glyph_cachels (XWINDOW (f->minibuffer_window)); | |
659 } | |
647 | 660 |
648 change_frame_size (f, f->height, f->width, 0); | 661 change_frame_size (f, f->height, f->width, 0); |
649 } | 662 } |
650 | 663 |
651 MAYBE_FRAMEMETH (f, init_frame_2, (f, props)); | 664 MAYBE_FRAMEMETH (f, init_frame_2, (f, props)); |