# HG changeset patch # User Gerd Moellmann # Date 959615483 0 # Node ID 4849a9a666abef7cb83c51f420f362599abbd34b # Parent 181d214fe71cb5c4a070151cbf8c80a69e9afcd9 (redisplay_window): Really switch buffers when displaying mode lines, and temporarily set selected_frame to the frame of the window that's redisplayed. diff -r 181d214fe71c -r 4849a9a666ab src/xdisp.c --- a/src/xdisp.c Mon May 29 15:50:01 2000 +0000 +++ b/src/xdisp.c Mon May 29 15:51:23 2000 +0000 @@ -9201,7 +9201,20 @@ && (WINDOW_WANTS_MODELINE_P (w) || WINDOW_WANTS_HEADER_LINE_P (w))) { + Lisp_Object old_selected_frame; + + old_selected_frame = selected_frame; + + if (!really_switched_buffer) + { + set_buffer_temp (old); + set_buffer_internal_1 (XBUFFER (w->buffer)); + really_switched_buffer = 1; + } + + XSETFRAME (selected_frame, f); display_mode_lines (w); + selected_frame = old_selected_frame; /* If mode line height has changed, arrange for a thorough immediate redisplay using the correct mode line height. */