structures now. Let that be done later outside of the
signal handler. */
change_frame_size (XFRAME (frame), width,
- height - FRAME_MENU_BAR_LINES (XFRAME (frame)),
+ height - FRAME_MENU_BAR_LINES (XFRAME (frame)) - FRAME_TAB_BAR_LINES (XFRAME (frame)),
0, 1, 0, 0);
}
}
change_frame_size (XFRAME (selected_frame),
FrameCols (t->display_info.tty),
FrameRows (t->display_info.tty)
- - FRAME_MENU_BAR_LINES (f), 0, 0, 1, 0);
+ - FRAME_MENU_BAR_LINES (f) - FRAME_TAB_BAR_LINES (f), 0, 0, 1, 0);
/* Delete the initial terminal. */
if (--initial_terminal->reference_count == 0
#endif
FRAME_MENU_BAR_LINES (f) = NILP (Vmenu_bar_mode) ? 0 : 1;
- FRAME_LINES (f) = FRAME_LINES (f) - FRAME_MENU_BAR_LINES (f);
+ FRAME_TAB_BAR_LINES (f) = NILP (Vtab_bar_mode) ? 0 : 1;
+ FRAME_LINES (f) = FRAME_LINES (f) - FRAME_MENU_BAR_LINES (f) - FRAME_TAB_BAR_LINES (f);
FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
- FRAME_TEXT_HEIGHT (f) = FRAME_TEXT_HEIGHT (f) - FRAME_MENU_BAR_HEIGHT (f);
+ FRAME_TAB_BAR_HEIGHT (f) = FRAME_TAB_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
+ FRAME_TEXT_HEIGHT (f) = FRAME_TEXT_HEIGHT (f) - FRAME_MENU_BAR_HEIGHT (f) - FRAME_TAB_BAR_HEIGHT (f);
/* Set the top frame to the newly created frame. */
if (FRAMEP (FRAME_TTY (f)->top_frame)
{
int width, height;
get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height);
- adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f),
+ adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f) - FRAME_TAB_BAR_LINES (f),
5, 0, Qterminal_frame);
}
int unit, font_ascent, font_descent;
#ifndef USE_X_TOOLKIT
int old_menu_bar_height = FRAME_MENU_BAR_HEIGHT (f);
+ int old_tab_bar_height = FRAME_TAB_BAR_HEIGHT (f);
Lisp_Object fullscreen;
#endif
#ifndef USE_X_TOOLKIT
FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
+ FRAME_TAB_BAR_HEIGHT (f) = FRAME_TAB_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
#endif
/* Compute character columns occupied by scrollbar.
FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3,
false, Qfont);
#ifndef USE_X_TOOLKIT
- if (FRAME_MENU_BAR_HEIGHT (f) != old_menu_bar_height
+ if ((FRAME_MENU_BAR_HEIGHT (f) != old_menu_bar_height
+ || FRAME_TAB_BAR_HEIGHT (f) != old_tab_bar_height)
&& !f->after_make_frame
&& (EQ (frame_inhibit_implied_resize, Qt)
|| (CONSP (frame_inhibit_implied_resize)
&& NILP (Fmemq (Qfont, frame_inhibit_implied_resize))))
&& (NILP (fullscreen = get_frame_param (f, Qfullscreen))
|| EQ (fullscreen, Qfullwidth)))
- /* If the menu bar height changes, try to keep text height
+ /* If the menu/tab bar height changes, try to keep text height
constant. */
adjust_frame_size
- (f, -1, FRAME_TEXT_HEIGHT (f) + FRAME_MENU_BAR_HEIGHT (f)
- - old_menu_bar_height, 1, false, Qfont);
+ (f, -1, FRAME_TEXT_HEIGHT (f) + FRAME_MENU_BAR_HEIGHT (f) + FRAME_TAB_BAR_HEIGHT (f)
+ - old_menu_bar_height - old_tab_bar_height, 1, false, Qfont);
#endif /* USE_X_TOOLKIT */
}
}
case FULLSCREEN_WIDTH:
lval = Qfullwidth;
width = x_display_pixel_width (dpyinfo);
- height = height + FRAME_MENUBAR_HEIGHT (f);
+ height = height + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f);
break;
case FULLSCREEN_HEIGHT:
lval = Qfullheight;
x_wait_for_event (f, ConfigureNotify);
else
{
- change_frame_size (f, width, height - FRAME_MENUBAR_HEIGHT (f),
+ change_frame_size (f, width, height - FRAME_MENUBAR_HEIGHT (f) - FRAME_TABBAR_HEIGHT (f),
false, true, false, true);
x_sync (f);
}
{
frame_size_history_add
(f, Qx_set_window_size_1, width, height,
- list2i (old_height, pixelheight + FRAME_MENUBAR_HEIGHT (f)));
+ list2i (old_height, pixelheight + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f)));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
- old_width, pixelheight + FRAME_MENUBAR_HEIGHT (f));
+ old_width, pixelheight + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f));
}
else if (EQ (fullscreen, Qfullheight) && height == FRAME_TEXT_HEIGHT (f))
{
{
frame_size_history_add
(f, Qx_set_window_size_3, width, height,
- list3i (pixelwidth + FRAME_TOOLBAR_WIDTH (f)
- + FRAME_TABBAR_WIDTH (f),
- (pixelheight + FRAME_TOOLBAR_HEIGHT (f)
- + FRAME_TABBAR_HEIGHT (f)
- + FRAME_MENUBAR_HEIGHT (f)),
- FRAME_MENUBAR_HEIGHT (f)));
+ list3i (pixelwidth + FRAME_TOOLBAR_WIDTH (f) + FRAME_TABBAR_WIDTH (f),
+ (pixelheight + FRAME_TOOLBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f)),
+ FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f)));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
- pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f));
+ pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f));
fullscreen = Qnil;
}
#ifdef USE_X_TOOLKIT
/* The menu bar is not part of text lines. The tool bar
is however. */
- pixelh -= FRAME_MENUBAR_HEIGHT (f);
+ pixelh -= FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f);
#endif
text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, FRAME_PIXEL_WIDTH (f));
text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, pixelh);
XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
free_frame_menubar (f);
+ free_frame_tab_bar (f);
if (f->shell_position)
xfree (f->shell_position);
size_hints.flags |= PBaseSize;
size_hints.base_width = base_width;
- size_hints.base_height = base_height + FRAME_MENUBAR_HEIGHT (f);
+ size_hints.base_height = base_height + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f);
size_hints.min_width = base_width;
size_hints.min_height = base_height;
}