comparison src/window.c @ 5587:3fde0e346ad7

Prevent assert at frame.c, l. 6311 by initializing glyph cachels. * frame.c (Fmake_frame): Ensure that reset_glyph_cachels gets called. (setup_minibuffer_frame): Improve header comment. * redisplay.c (redisplay_window): Update comment. Remove code checking for uninitialized face_cachels and glyph_cachels. Can't happen in theory, and guarded by asserts in practice. * window.c (allocate_window): Update comment on reset_*_cachels.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sat, 29 Oct 2011 00:35:33 +0900
parents 56144c8593a8
children a1808d52a34a
comparison
equal deleted inserted replaced
5586:d8a11d5ebc9f 5587:3fde0e346ad7
381 window to get created and functions which reference these values 381 window to get created and functions which reference these values
382 called before redisplay works with the window for the first time. 382 called before redisplay works with the window for the first time.
383 All callers of allocate_window should therefore call 383 All callers of allocate_window should therefore call
384 reset_face_cachels on the created window. We can't do it 384 reset_face_cachels on the created window. We can't do it
385 here because the window must have its frame pointer set or 385 here because the window must have its frame pointer set or
386 reset_face_cachels will fail. */ 386 reset_face_cachels will fail.
387 A similar requirement holds for reset_glyph_cachels. We *could* do
388 that here (there's no reference to the frame pointer in that function),
389 but we may as well have the same discipline. */
387 Lisp_Object 390 Lisp_Object
388 allocate_window (void) 391 allocate_window (void)
389 { 392 {
390 Lisp_Object obj = ALLOC_NORMAL_LISP_OBJECT (window); 393 Lisp_Object obj = ALLOC_NORMAL_LISP_OBJECT (window);
391 struct window *p = XWINDOW (obj); 394 struct window *p = XWINDOW (obj);