[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8a4bb6b: Fix a problem with x_set_tab_bar_lines (Bug#46827)
From: |
Martin Rudalics |
Subject: |
master 8a4bb6b: Fix a problem with x_set_tab_bar_lines (Bug#46827) |
Date: |
Tue, 4 May 2021 03:18:34 -0400 (EDT) |
branch: master
commit 8a4bb6b0560ef3f4890789a574488f7cf69ee237
Author: Martin Rudalics <rudalics@gmx.at>
Commit: Martin Rudalics <rudalics@gmx.at>
Fix a problem with x_set_tab_bar_lines (Bug#46827)
* src/xfns.c (x_set_tab_bar_lines): Call
x_change_tab_bar_height only if the number of tab bar lines
changed from or to zero (Bug#46827).
* src/xterm.c (x_make_frame_visible): Make frame_size_history
update less noisy by doing it only if the frame wasn't visible
before.
---
src/xfns.c | 9 ++++++---
src/xterm.c | 12 +++++++-----
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/xfns.c b/src/xfns.c
index 2c95065..782e0a4 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1608,13 +1608,15 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object
value, Lisp_Object oldval)
/* Set the number of lines used for the tab bar of frame F to VALUE.
VALUE not an integer, or < 0 means set the lines to zero. OLDVAL
- is the old number of tab bar lines. This function changes the
+ is the old number of tab bar lines. This function may change the
height of all windows on frame F to match the new tab bar height.
- The frame's height doesn't change. */
+ The frame's height may change if frame_inhibit_implied_resize was
+ set accordingly. */
static void
x_set_tab_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
{
+ int olines = FRAME_TAB_BAR_LINES (f);
int nlines;
/* Treat tab bars like menu bars. */
@@ -1627,7 +1629,8 @@ x_set_tab_bar_lines (struct frame *f, Lisp_Object value,
Lisp_Object oldval)
else
nlines = 0;
- x_change_tab_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
+ if (nlines != olines && (olines == 0 || nlines == 0))
+ x_change_tab_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
}
diff --git a/src/xterm.c b/src/xterm.c
index 189e3a4..88a393c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11823,12 +11823,14 @@ x_make_frame_visible (struct frame *f)
poll_suppress_count = old_poll_suppress_count;
#endif
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("x_make_frame_visible"));
+ if (!FRAME_VISIBLE_P (f))
+ {
+ if (CONSP (frame_size_history))
+ frame_size_history_plain
+ (f, build_string ("x_make_frame_visible"));
- if (! FRAME_VISIBLE_P (f))
- x_wait_for_event (f, MapNotify);
+ x_wait_for_event (f, MapNotify);
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8a4bb6b: Fix a problem with x_set_tab_bar_lines (Bug#46827),
Martin Rudalics <=