diff options
| author | Martin Rudalics | 2021-05-02 17:44:01 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2021-05-02 17:44:01 +0200 |
| commit | 30d974bf5c02a1367291fbb6fa17a182bb7974b7 (patch) | |
| tree | 5bf0e3711414cc2eb973f9613cda75a51ef6b45b | |
| parent | 21f2fbb648a3af543d4cb23d6e7573588cc7ecb2 (diff) | |
| download | emacs-30d974bf5c02a1367291fbb6fa17a182bb7974b7.tar.gz emacs-30d974bf5c02a1367291fbb6fa17a182bb7974b7.zip | |
Add two changes announced but not included in previous commit
* src/frame.c (adjust_frame_size): Remove extra
inhibit_horizontal/_vertical checks. Improve the implied
resize check when INHIBIT equals 2.
| -rw-r--r-- | src/frame.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/frame.c b/src/frame.c index 32110512e95..d884a6d8b96 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -722,29 +722,25 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height, | |||
| 722 | && (new_native_height != old_native_height | 722 | && (new_native_height != old_native_height |
| 723 | || inhibit == 0 || inhibit == 2)))) | 723 | || inhibit == 0 || inhibit == 2)))) |
| 724 | { | 724 | { |
| 725 | /* Make sure we respect fullheight and fullwidth. */ | 725 | if (inhibit == 2 |
| 726 | if (inhibit_horizontal) | 726 | #ifdef USE_MOTIF |
| 727 | new_native_width = old_native_width; | 727 | && !EQ (parameter, Qmenu_bar_lines) |
| 728 | else if (inhibit_vertical) | 728 | #endif |
| 729 | new_native_height = old_native_height; | 729 | && (f->new_width >= 0 || f->new_height >= 0)) |
| 730 | |||
| 731 | if (inhibit == 2 && f->new_width > 0 && f->new_height > 0) | ||
| 732 | /* For implied resizes with inhibit 2 (external menu and tool | 730 | /* For implied resizes with inhibit 2 (external menu and tool |
| 733 | bar) pick up any new sizes the display engine has not | 731 | bar) pick up any new sizes the display engine has not |
| 734 | processed yet. Otherwsie, we would request the old sizes | 732 | processed yet. Otherwsie, we would request the old sizes |
| 735 | which will make this request appear as a request to set new | 733 | which will make this request appear as a request to set new |
| 736 | sizes and have the WM react accordingly which is not TRT. */ | 734 | sizes and have the WM react accordingly which is not TRT. |
| 735 | |||
| 736 | We don't that for the external menu bar on Motif. | ||
| 737 | Otherwise, switching off the menu bar will shrink the frame | ||
| 738 | and switching it on will not enlarge it. */ | ||
| 737 | { | 739 | { |
| 738 | /* But don't that for the external menu bar on Motif. | 740 | if (f->new_width >= 0) |
| 739 | Otherwise, switching off the menu bar will shrink the frame | 741 | new_native_width = f->new_width; |
| 740 | and switching it on will not enlarge it. */ | 742 | if (f->new_height >= 0) |
| 741 | #ifdef USE_MOTIF | 743 | new_native_height = f->new_height; |
| 742 | if (!EQ (parameter, Qmenu_bar_lines)) | ||
| 743 | #endif | ||
| 744 | { | ||
| 745 | new_native_width = f->new_width; | ||
| 746 | new_native_height = f->new_height; | ||
| 747 | } | ||
| 748 | } | 744 | } |
| 749 | 745 | ||
| 750 | if (CONSP (frame_size_history)) | 746 | if (CONSP (frame_size_history)) |