diff options
| author | Gerd Moellmann | 2001-09-26 08:19:04 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-09-26 08:19:04 +0000 |
| commit | edd1e654772bd0690f04a94b007156c3885f0042 (patch) | |
| tree | 6a629f6d9faafe3b6f7dd37c940b69274e176c76 /src | |
| parent | daba7643145774bf021cd91407d056d99e91f008 (diff) | |
| download | emacs-edd1e654772bd0690f04a94b007156c3885f0042.tar.gz emacs-edd1e654772bd0690f04a94b007156c3885f0042.zip | |
(display_mode_lines): Temporarily set selected_frame
and selected_window to the frame of the window whose mode-lines
are display, and to the window itself.
(redisplay_window, redisplay_mode_lines): Don't set selected_frame
here.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/xdisp.c | 20 |
2 files changed, 16 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 248d3ac5ad7..db0b6e9cff6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2001-09-26 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (display_mode_lines): Temporarily set selected_frame | ||
| 4 | and selected_window to the frame of the window whose mode-lines | ||
| 5 | are displayed, and to the window itself. | ||
| 6 | (redisplay_window, redisplay_mode_lines): Don't set selected_frame | ||
| 7 | here. | ||
| 8 | |||
| 1 | 2001-09-25 Gerd Moellmann <gerd@gnu.org> | 9 | 2001-09-25 Gerd Moellmann <gerd@gnu.org> |
| 2 | 10 | ||
| 3 | * xfns.c (x_kill_gs_process): Recognize if someone has cleared | 11 | * xfns.c (x_kill_gs_process): Recognize if someone has cleared |
diff --git a/src/xdisp.c b/src/xdisp.c index e7ee384f381..02141b7c86b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -10356,13 +10356,7 @@ redisplay_window (window, just_this_one_p) | |||
| 10356 | && (WINDOW_WANTS_MODELINE_P (w) | 10356 | && (WINDOW_WANTS_MODELINE_P (w) |
| 10357 | || WINDOW_WANTS_HEADER_LINE_P (w))) | 10357 | || WINDOW_WANTS_HEADER_LINE_P (w))) |
| 10358 | { | 10358 | { |
| 10359 | Lisp_Object old_selected_frame; | ||
| 10360 | |||
| 10361 | old_selected_frame = selected_frame; | ||
| 10362 | |||
| 10363 | XSETFRAME (selected_frame, f); | ||
| 10364 | display_mode_lines (w); | 10359 | display_mode_lines (w); |
| 10365 | selected_frame = old_selected_frame; | ||
| 10366 | 10360 | ||
| 10367 | /* If mode line height has changed, arrange for a thorough | 10361 | /* If mode line height has changed, arrange for a thorough |
| 10368 | immediate redisplay using the correct mode line height. */ | 10362 | immediate redisplay using the correct mode line height. */ |
| @@ -13221,7 +13215,6 @@ redisplay_mode_lines (window, force) | |||
| 13221 | || FRAME_GARBAGED_P (XFRAME (w->frame)) | 13215 | || FRAME_GARBAGED_P (XFRAME (w->frame)) |
| 13222 | || !MATRIX_MODE_LINE_ROW (w->current_matrix)->enabled_p) | 13216 | || !MATRIX_MODE_LINE_ROW (w->current_matrix)->enabled_p) |
| 13223 | { | 13217 | { |
| 13224 | Lisp_Object old_selected_frame; | ||
| 13225 | struct text_pos lpoint; | 13218 | struct text_pos lpoint; |
| 13226 | struct buffer *old = current_buffer; | 13219 | struct buffer *old = current_buffer; |
| 13227 | 13220 | ||
| @@ -13244,10 +13237,6 @@ redisplay_mode_lines (window, force) | |||
| 13244 | TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt)); | 13237 | TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt)); |
| 13245 | } | 13238 | } |
| 13246 | 13239 | ||
| 13247 | /* Temporarily set up the selected frame. */ | ||
| 13248 | old_selected_frame = selected_frame; | ||
| 13249 | selected_frame = w->frame; | ||
| 13250 | |||
| 13251 | /* Display mode lines. */ | 13240 | /* Display mode lines. */ |
| 13252 | clear_glyph_matrix (w->desired_matrix); | 13241 | clear_glyph_matrix (w->desired_matrix); |
| 13253 | if (display_mode_lines (w)) | 13242 | if (display_mode_lines (w)) |
| @@ -13257,7 +13246,6 @@ redisplay_mode_lines (window, force) | |||
| 13257 | } | 13246 | } |
| 13258 | 13247 | ||
| 13259 | /* Restore old settings. */ | 13248 | /* Restore old settings. */ |
| 13260 | selected_frame = old_selected_frame; | ||
| 13261 | set_buffer_internal_1 (old); | 13249 | set_buffer_internal_1 (old); |
| 13262 | TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); | 13250 | TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); |
| 13263 | } | 13251 | } |
| @@ -13276,7 +13264,13 @@ static int | |||
| 13276 | display_mode_lines (w) | 13264 | display_mode_lines (w) |
| 13277 | struct window *w; | 13265 | struct window *w; |
| 13278 | { | 13266 | { |
| 13267 | Lisp_Object old_selected_window, old_selected_frame; | ||
| 13279 | int n = 0; | 13268 | int n = 0; |
| 13269 | |||
| 13270 | old_selected_frame = selected_frame; | ||
| 13271 | selected_frame = w->frame; | ||
| 13272 | old_selected_window = selected_window; | ||
| 13273 | XSETWINDOW (selected_window, w); | ||
| 13280 | 13274 | ||
| 13281 | /* These will be set while the mode line specs are processed. */ | 13275 | /* These will be set while the mode line specs are processed. */ |
| 13282 | line_number_displayed = 0; | 13276 | line_number_displayed = 0; |
| @@ -13296,6 +13290,8 @@ display_mode_lines (w) | |||
| 13296 | ++n; | 13290 | ++n; |
| 13297 | } | 13291 | } |
| 13298 | 13292 | ||
| 13293 | selected_frame = old_selected_frame; | ||
| 13294 | selected_window = old_selected_window; | ||
| 13299 | return n; | 13295 | return n; |
| 13300 | } | 13296 | } |
| 13301 | 13297 | ||