diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 48c57676757..5d1b3018bde 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -677,6 +677,28 @@ prepare_menu_bars () | |||
| 677 | all_windows = (update_mode_lines || buffer_shared > 1 | 677 | all_windows = (update_mode_lines || buffer_shared > 1 |
| 678 | || clip_changed || windows_or_buffers_changed); | 678 | || clip_changed || windows_or_buffers_changed); |
| 679 | 679 | ||
| 680 | /* Update all frame titles based on their buffer names, etc. | ||
| 681 | We do this before the menu bars so that the buffer-menu | ||
| 682 | will show the up-to-date frame titles. | ||
| 683 | |||
| 684 | This used to be done after the menu bars, for a reason that | ||
| 685 | was stated as follows but which I do not understand: | ||
| 686 | "We do this after the menu bars so that the frame will first | ||
| 687 | create its menu bar using the name `emacs' if no other name | ||
| 688 | has yet been specified." | ||
| 689 | I think that is no longer a concern. */ | ||
| 690 | #ifdef HAVE_X_WINDOWS | ||
| 691 | if (windows_or_buffers_changed) | ||
| 692 | { | ||
| 693 | Lisp_Object tail, frame; | ||
| 694 | |||
| 695 | FOR_EACH_FRAME (tail, frame) | ||
| 696 | if (FRAME_VISIBLE_P (XFRAME (frame)) | ||
| 697 | || FRAME_ICONIFIED_P (XFRAME (frame))) | ||
| 698 | x_consider_frame_title (frame); | ||
| 699 | } | ||
| 700 | #endif | ||
| 701 | |||
| 680 | /* Update the menu bar item lists, if appropriate. | 702 | /* Update the menu bar item lists, if appropriate. |
| 681 | This has to be done before any actual redisplay | 703 | This has to be done before any actual redisplay |
| 682 | or generation of display lines. */ | 704 | or generation of display lines. */ |
| @@ -714,22 +736,6 @@ prepare_menu_bars () | |||
| 714 | } | 736 | } |
| 715 | else | 737 | else |
| 716 | update_menu_bar (selected_frame, 1); | 738 | update_menu_bar (selected_frame, 1); |
| 717 | |||
| 718 | /* Update all frame titles based on their buffer names, etc. | ||
| 719 | We do this after the menu bars so that the frame will first | ||
| 720 | create its menu bar using the name `emacs' if no other name | ||
| 721 | has yet been specified. */ | ||
| 722 | #ifdef HAVE_X_WINDOWS | ||
| 723 | if (windows_or_buffers_changed) | ||
| 724 | { | ||
| 725 | Lisp_Object tail, frame; | ||
| 726 | |||
| 727 | FOR_EACH_FRAME (tail, frame) | ||
| 728 | if (FRAME_VISIBLE_P (XFRAME (frame)) | ||
| 729 | || FRAME_ICONIFIED_P (XFRAME (frame))) | ||
| 730 | x_consider_frame_title (frame); | ||
| 731 | } | ||
| 732 | #endif | ||
| 733 | } | 739 | } |
| 734 | 740 | ||
| 735 | /* Do a frame update, taking possible shortcuts into account. | 741 | /* Do a frame update, taking possible shortcuts into account. |