aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2021-05-04 09:17:11 +0200
committerMartin Rudalics2021-05-04 09:17:11 +0200
commit8a4bb6b0560ef3f4890789a574488f7cf69ee237 (patch)
tree918a64b2bd9423ef198f69256d60ec1cc2fea7ea
parent131e874d143167508cf4a210bfc53e44ecca3195 (diff)
downloademacs-8a4bb6b0560ef3f4890789a574488f7cf69ee237.tar.gz
emacs-8a4bb6b0560ef3f4890789a574488f7cf69ee237.zip
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.
-rw-r--r--src/xfns.c9
-rw-r--r--src/xterm.c12
2 files changed, 13 insertions, 8 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 2c95065d3ea..782e0a483c4 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)
1608 1608
1609/* Set the number of lines used for the tab bar of frame F to VALUE. 1609/* Set the number of lines used for the tab bar of frame F to VALUE.
1610 VALUE not an integer, or < 0 means set the lines to zero. OLDVAL 1610 VALUE not an integer, or < 0 means set the lines to zero. OLDVAL
1611 is the old number of tab bar lines. This function changes the 1611 is the old number of tab bar lines. This function may change the
1612 height of all windows on frame F to match the new tab bar height. 1612 height of all windows on frame F to match the new tab bar height.
1613 The frame's height doesn't change. */ 1613 The frame's height may change if frame_inhibit_implied_resize was
1614 set accordingly. */
1614 1615
1615static void 1616static void
1616x_set_tab_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) 1617x_set_tab_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1617{ 1618{
1619 int olines = FRAME_TAB_BAR_LINES (f);
1618 int nlines; 1620 int nlines;
1619 1621
1620 /* Treat tab bars like menu bars. */ 1622 /* Treat tab bars like menu bars. */
@@ -1627,7 +1629,8 @@ x_set_tab_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1627 else 1629 else
1628 nlines = 0; 1630 nlines = 0;
1629 1631
1630 x_change_tab_bar_height (f, nlines * FRAME_LINE_HEIGHT (f)); 1632 if (nlines != olines && (olines == 0 || nlines == 0))
1633 x_change_tab_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
1631} 1634}
1632 1635
1633 1636
diff --git a/src/xterm.c b/src/xterm.c
index 189e3a47eea..88a393cc6c2 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11823,12 +11823,14 @@ x_make_frame_visible (struct frame *f)
11823 poll_suppress_count = old_poll_suppress_count; 11823 poll_suppress_count = old_poll_suppress_count;
11824#endif 11824#endif
11825 11825
11826 if (CONSP (frame_size_history)) 11826 if (!FRAME_VISIBLE_P (f))
11827 frame_size_history_plain 11827 {
11828 (f, build_string ("x_make_frame_visible")); 11828 if (CONSP (frame_size_history))
11829 frame_size_history_plain
11830 (f, build_string ("x_make_frame_visible"));
11829 11831
11830 if (! FRAME_VISIBLE_P (f)) 11832 x_wait_for_event (f, MapNotify);
11831 x_wait_for_event (f, MapNotify); 11833 }
11832 } 11834 }
11833} 11835}
11834 11836