summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2021-05-02 17:44:01 +0200
committerMartin Rudalics <rudalics@gmx.at>2021-05-02 17:44:01 +0200
commit30d974bf5c02a1367291fbb6fa17a182bb7974b7 (patch)
tree5bf0e3711414cc2eb973f9613cda75a51ef6b45b /src/frame.c
parent21f2fbb648a3af543d4cb23d6e7573588cc7ecb2 (diff)
downloademacs-30d974bf5c02a1367291fbb6fa17a182bb7974b7.tar.gz
emacs-30d974bf5c02a1367291fbb6fa17a182bb7974b7.tar.bz2
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.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c32
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,
&& (new_native_height != old_native_height
|| inhibit == 0 || inhibit == 2))))
{
- /* Make sure we respect fullheight and fullwidth. */
- if (inhibit_horizontal)
- new_native_width = old_native_width;
- else if (inhibit_vertical)
- new_native_height = old_native_height;
-
- if (inhibit == 2 && f->new_width > 0 && f->new_height > 0)
+ if (inhibit == 2
+#ifdef USE_MOTIF
+ && !EQ (parameter, Qmenu_bar_lines)
+#endif
+ && (f->new_width >= 0 || f->new_height >= 0))
/* For implied resizes with inhibit 2 (external menu and tool
bar) pick up any new sizes the display engine has not
processed yet. Otherwsie, we would request the old sizes
which will make this request appear as a request to set new
- sizes and have the WM react accordingly which is not TRT. */
+ sizes and have the WM react accordingly which is not TRT.
+
+ We don't that for the external menu bar on Motif.
+ Otherwise, switching off the menu bar will shrink the frame
+ and switching it on will not enlarge it. */
{
- /* But don't that for the external menu bar on Motif.
- Otherwise, switching off the menu bar will shrink the frame
- and switching it on will not enlarge it. */
-#ifdef USE_MOTIF
- if (!EQ (parameter, Qmenu_bar_lines))
-#endif
- {
- new_native_width = f->new_width;
- new_native_height = f->new_height;
- }
+ if (f->new_width >= 0)
+ new_native_width = f->new_width;
+ if (f->new_height >= 0)
+ new_native_height = f->new_height;
}
if (CONSP (frame_size_history))