+2001-09-26 Gerd Moellmann <gerd@gnu.org>
+
+ * xdisp.c (display_mode_lines): Temporarily set selected_frame
+ and selected_window to the frame of the window whose mode-lines
+ are displayed, and to the window itself.
+ (redisplay_window, redisplay_mode_lines): Don't set selected_frame
+ here.
+
2001-09-25 Gerd Moellmann <gerd@gnu.org>
* xfns.c (x_kill_gs_process): Recognize if someone has cleared
&& (WINDOW_WANTS_MODELINE_P (w)
|| WINDOW_WANTS_HEADER_LINE_P (w)))
{
- Lisp_Object old_selected_frame;
-
- old_selected_frame = selected_frame;
-
- 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. */
|| FRAME_GARBAGED_P (XFRAME (w->frame))
|| !MATRIX_MODE_LINE_ROW (w->current_matrix)->enabled_p)
{
- Lisp_Object old_selected_frame;
struct text_pos lpoint;
struct buffer *old = current_buffer;
TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt));
}
- /* Temporarily set up the selected frame. */
- old_selected_frame = selected_frame;
- selected_frame = w->frame;
-
/* Display mode lines. */
clear_glyph_matrix (w->desired_matrix);
if (display_mode_lines (w))
}
/* Restore old settings. */
- selected_frame = old_selected_frame;
set_buffer_internal_1 (old);
TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint));
}
display_mode_lines (w)
struct window *w;
{
+ Lisp_Object old_selected_window, old_selected_frame;
int n = 0;
+
+ old_selected_frame = selected_frame;
+ selected_frame = w->frame;
+ old_selected_window = selected_window;
+ XSETWINDOW (selected_window, w);
/* These will be set while the mode line specs are processed. */
line_number_displayed = 0;
++n;
}
+ selected_frame = old_selected_frame;
+ selected_window = old_selected_window;
return n;
}