diff --git a/src/xfns.c b/src/xfns.c index 2c95065d3e..c6a128ef51 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1615,6 +1615,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) 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 +1628,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)); }