summaryrefslogtreecommitdiff
path: root/src/nsfns.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/nsfns.m')
-rw-r--r--src/nsfns.m17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index 2699cf37a5b..d793bcf13ff 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -632,10 +632,19 @@ ns_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
void
ns_change_tab_bar_height (struct frame *f, int height)
{
- int unit = FRAME_LINE_HEIGHT (f);
- int old_height = FRAME_TAB_BAR_HEIGHT (f);
- int lines = (height + unit - 1) / unit;
- Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
+ int unit, old_height, lines;
+ Lisp_Object fullscreen;
+
+ unit = FRAME_LINE_HEIGHT (f);
+ old_height = FRAME_TAB_BAR_HEIGHT (f);
+ fullscreen = get_frame_param (f, Qfullscreen);
+
+ /* This differs from the tool bar code in that the tab bar height is
+ not rounded up. Otherwise, if redisplay_tab_bar decides to grow
+ the tab bar by even 1 pixel, FRAME_TAB_BAR_LINES will be changed,
+ leading to the tab bar height being incorrectly set upon the next
+ call to x_set_font. (bug#59285) */
+ lines = height / unit;
/* Make sure we redisplay all windows in this frame. */
fset_redisplay (f);