Mercurial > emacs
comparison src/window.c @ 6099:19eaf70457d4
(Fset_window_configuration): Allow for menu-bar-lines to have changed since
the configuration was created.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Sat, 26 Feb 1994 04:24:37 +0000 |
parents | 936d4a988148 |
children | d695df82e96a |
comparison
equal
deleted
inserted
replaced
6098:b91e19be1513 | 6099:19eaf70457d4 |
---|---|
2474 | 2474 |
2475 struct save_window_data | 2475 struct save_window_data |
2476 { | 2476 { |
2477 int size_from_Lisp_Vector_struct; | 2477 int size_from_Lisp_Vector_struct; |
2478 struct Lisp_Vector *next_from_Lisp_Vector_struct; | 2478 struct Lisp_Vector *next_from_Lisp_Vector_struct; |
2479 Lisp_Object frame_width, frame_height; | 2479 Lisp_Object frame_width, frame_height, frame_menu_bar_lines; |
2480 Lisp_Object selected_frame; | 2480 Lisp_Object selected_frame; |
2481 Lisp_Object current_window; | 2481 Lisp_Object current_window; |
2482 Lisp_Object current_buffer; | 2482 Lisp_Object current_buffer; |
2483 Lisp_Object minibuf_scroll_window; | 2483 Lisp_Object minibuf_scroll_window; |
2484 Lisp_Object root_window; | 2484 Lisp_Object root_window; |
2567 made, we change the frame to the size specified in the | 2567 made, we change the frame to the size specified in the |
2568 configuration, restore the configuration, and then resize it | 2568 configuration, restore the configuration, and then resize it |
2569 back. We keep track of the prevailing height in these variables. */ | 2569 back. We keep track of the prevailing height in these variables. */ |
2570 int previous_frame_height = FRAME_HEIGHT (f); | 2570 int previous_frame_height = FRAME_HEIGHT (f); |
2571 int previous_frame_width = FRAME_WIDTH (f); | 2571 int previous_frame_width = FRAME_WIDTH (f); |
2572 int previous_frame_menu_bar_lines = FRAME_MENU_BAR_LINES (f); | |
2572 | 2573 |
2573 if (XFASTINT (data->frame_height) != previous_frame_height | 2574 if (XFASTINT (data->frame_height) != previous_frame_height |
2574 || XFASTINT (data->frame_width) != previous_frame_width) | 2575 || XFASTINT (data->frame_width) != previous_frame_width) |
2575 change_frame_size (f, data->frame_height, data->frame_width, 0, 0); | 2576 change_frame_size (f, data->frame_height, data->frame_width, 0, 0); |
2577 if (XFASTINT (data->frame_menu_bar_lines) | |
2578 != previous_frame_menu_bar_lines) | |
2579 x_set_menu_bar_lines (f, data->frame_menu_bar_lines, 0); | |
2576 | 2580 |
2577 windows_or_buffers_changed++; | 2581 windows_or_buffers_changed++; |
2578 | 2582 |
2579 /* Kludge Alert! | 2583 /* Kludge Alert! |
2580 Mark all windows now on frame as "deleted". | 2584 Mark all windows now on frame as "deleted". |
2708 /* Set the screen height to the value it had before this function. */ | 2712 /* Set the screen height to the value it had before this function. */ |
2709 if (previous_frame_height != FRAME_HEIGHT (f) | 2713 if (previous_frame_height != FRAME_HEIGHT (f) |
2710 || previous_frame_width != FRAME_WIDTH (f)) | 2714 || previous_frame_width != FRAME_WIDTH (f)) |
2711 change_frame_size (f, previous_frame_height, previous_frame_width, | 2715 change_frame_size (f, previous_frame_height, previous_frame_width, |
2712 0, 0); | 2716 0, 0); |
2717 if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f)) | |
2718 x_set_menu_bar_lines (f, previous_frame_menu_bar_lines, 0); | |
2713 } | 2719 } |
2714 | 2720 |
2715 #ifdef MULTI_FRAME | 2721 #ifdef MULTI_FRAME |
2716 /* Fselect_window will have made f the selected frame, so we | 2722 /* Fselect_window will have made f the selected frame, so we |
2717 reselect the proper frame here. Fhandle_switch_frame will change the | 2723 reselect the proper frame here. Fhandle_switch_frame will change the |
2870 data = (struct save_window_data *) | 2876 data = (struct save_window_data *) |
2871 XVECTOR (Fmake_vector (make_number (SAVE_WINDOW_DATA_SIZE), | 2877 XVECTOR (Fmake_vector (make_number (SAVE_WINDOW_DATA_SIZE), |
2872 Qnil)); | 2878 Qnil)); |
2873 XFASTINT (data->frame_width) = FRAME_WIDTH (f); | 2879 XFASTINT (data->frame_width) = FRAME_WIDTH (f); |
2874 XFASTINT (data->frame_height) = FRAME_HEIGHT (f); | 2880 XFASTINT (data->frame_height) = FRAME_HEIGHT (f); |
2881 XFASTINT (data->frame_menu_bar_lines) = FRAME_MENU_BAR_LINES (f); | |
2875 #ifdef MULTI_FRAME | 2882 #ifdef MULTI_FRAME |
2876 XSET (data->selected_frame, Lisp_Frame, selected_frame); | 2883 XSET (data->selected_frame, Lisp_Frame, selected_frame); |
2877 #endif | 2884 #endif |
2878 data->current_window = FRAME_SELECTED_WINDOW (f); | 2885 data->current_window = FRAME_SELECTED_WINDOW (f); |
2879 XSET (data->current_buffer, Lisp_Buffer, current_buffer); | 2886 XSET (data->current_buffer, Lisp_Buffer, current_buffer); |