aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c4
-rw-r--r--src/frame.c8
-rw-r--r--src/keyboard.c2
-rw-r--r--src/term.c2
-rw-r--r--src/xterm.c35
5 files changed, 27 insertions, 24 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 3e1dad14067..7e89a855bbb 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5675,7 +5675,7 @@ handle_window_change_signal (int sig)
5675 structures now. Let that be done later outside of the 5675 structures now. Let that be done later outside of the
5676 signal handler. */ 5676 signal handler. */
5677 change_frame_size (XFRAME (frame), width, 5677 change_frame_size (XFRAME (frame), width,
5678 height - FRAME_MENU_BAR_LINES (XFRAME (frame)), 5678 height - FRAME_MENU_BAR_LINES (XFRAME (frame)) - FRAME_TAB_BAR_LINES (XFRAME (frame)),
5679 0, 1, 0, 0); 5679 0, 1, 0, 0);
5680 } 5680 }
5681 } 5681 }
@@ -6355,7 +6355,7 @@ init_display_interactive (void)
6355 change_frame_size (XFRAME (selected_frame), 6355 change_frame_size (XFRAME (selected_frame),
6356 FrameCols (t->display_info.tty), 6356 FrameCols (t->display_info.tty),
6357 FrameRows (t->display_info.tty) 6357 FrameRows (t->display_info.tty)
6358 - FRAME_MENU_BAR_LINES (f), 0, 0, 1, 0); 6358 - FRAME_MENU_BAR_LINES (f) - FRAME_TAB_BAR_LINES (f), 0, 0, 1, 0);
6359 6359
6360 /* Delete the initial terminal. */ 6360 /* Delete the initial terminal. */
6361 if (--initial_terminal->reference_count == 0 6361 if (--initial_terminal->reference_count == 0
diff --git a/src/frame.c b/src/frame.c
index ae0b60a58d5..5caa3f46714 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1190,9 +1190,11 @@ make_terminal_frame (struct terminal *terminal)
1190#endif 1190#endif
1191 1191
1192 FRAME_MENU_BAR_LINES (f) = NILP (Vmenu_bar_mode) ? 0 : 1; 1192 FRAME_MENU_BAR_LINES (f) = NILP (Vmenu_bar_mode) ? 0 : 1;
1193 FRAME_LINES (f) = FRAME_LINES (f) - FRAME_MENU_BAR_LINES (f); 1193 FRAME_TAB_BAR_LINES (f) = NILP (Vtab_bar_mode) ? 0 : 1;
1194 FRAME_LINES (f) = FRAME_LINES (f) - FRAME_MENU_BAR_LINES (f) - FRAME_TAB_BAR_LINES (f);
1194 FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); 1195 FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
1195 FRAME_TEXT_HEIGHT (f) = FRAME_TEXT_HEIGHT (f) - FRAME_MENU_BAR_HEIGHT (f); 1196 FRAME_TAB_BAR_HEIGHT (f) = FRAME_TAB_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
1197 FRAME_TEXT_HEIGHT (f) = FRAME_TEXT_HEIGHT (f) - FRAME_MENU_BAR_HEIGHT (f) - FRAME_TAB_BAR_HEIGHT (f);
1196 1198
1197 /* Set the top frame to the newly created frame. */ 1199 /* Set the top frame to the newly created frame. */
1198 if (FRAMEP (FRAME_TTY (f)->top_frame) 1200 if (FRAMEP (FRAME_TTY (f)->top_frame)
@@ -1314,7 +1316,7 @@ affects all frames on the same terminal device. */)
1314 { 1316 {
1315 int width, height; 1317 int width, height;
1316 get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height); 1318 get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height);
1317 adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f), 1319 adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f) - FRAME_TAB_BAR_LINES (f),
1318 5, 0, Qterminal_frame); 1320 5, 0, Qterminal_frame);
1319 } 1321 }
1320 1322
diff --git a/src/keyboard.c b/src/keyboard.c
index 44f6421ef52..51040f067df 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -10711,7 +10711,7 @@ On such systems, Emacs starts a subshell instead of suspending. */)
10711 get_tty_size (fileno (CURTTY ()->input), &width, &height); 10711 get_tty_size (fileno (CURTTY ()->input), &width, &height);
10712 if (width != old_width || height != old_height) 10712 if (width != old_width || height != old_height)
10713 change_frame_size (SELECTED_FRAME (), width, 10713 change_frame_size (SELECTED_FRAME (), width,
10714 height - FRAME_MENU_BAR_LINES (SELECTED_FRAME ()), 10714 height - FRAME_MENU_BAR_LINES (SELECTED_FRAME ()) - FRAME_TAB_BAR_LINES (SELECTED_FRAME ()),
10715 0, 0, 0, 0); 10715 0, 0, 0, 0);
10716 10716
10717 run_hook (intern ("suspend-resume-hook")); 10717 run_hook (intern ("suspend-resume-hook"));
diff --git a/src/term.c b/src/term.c
index a88d47f9238..6f9ac099907 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2342,7 +2342,7 @@ frame's terminal). */)
2342 was suspended. */ 2342 was suspended. */
2343 get_tty_size (fileno (t->display_info.tty->input), &width, &height); 2343 get_tty_size (fileno (t->display_info.tty->input), &width, &height);
2344 if (width != old_width || height != old_height) 2344 if (width != old_width || height != old_height)
2345 change_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f), 2345 change_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f) - FRAME_TAB_BAR_LINES (f),
2346 0, 0, 0, 0); 2346 0, 0, 0, 0);
2347 SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1); 2347 SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1);
2348 } 2348 }
diff --git a/src/xterm.c b/src/xterm.c
index 9e5ff793e77..e98e590df71 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10176,6 +10176,7 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
10176 int unit, font_ascent, font_descent; 10176 int unit, font_ascent, font_descent;
10177#ifndef USE_X_TOOLKIT 10177#ifndef USE_X_TOOLKIT
10178 int old_menu_bar_height = FRAME_MENU_BAR_HEIGHT (f); 10178 int old_menu_bar_height = FRAME_MENU_BAR_HEIGHT (f);
10179 int old_tab_bar_height = FRAME_TAB_BAR_HEIGHT (f);
10179 Lisp_Object fullscreen; 10180 Lisp_Object fullscreen;
10180#endif 10181#endif
10181 10182
@@ -10195,6 +10196,7 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
10195 10196
10196#ifndef USE_X_TOOLKIT 10197#ifndef USE_X_TOOLKIT
10197 FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); 10198 FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
10199 FRAME_TAB_BAR_HEIGHT (f) = FRAME_TAB_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
10198#endif 10200#endif
10199 10201
10200 /* Compute character columns occupied by scrollbar. 10202 /* Compute character columns occupied by scrollbar.
@@ -10219,18 +10221,19 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
10219 FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, 10221 FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3,
10220 false, Qfont); 10222 false, Qfont);
10221#ifndef USE_X_TOOLKIT 10223#ifndef USE_X_TOOLKIT
10222 if (FRAME_MENU_BAR_HEIGHT (f) != old_menu_bar_height 10224 if ((FRAME_MENU_BAR_HEIGHT (f) != old_menu_bar_height
10225 || FRAME_TAB_BAR_HEIGHT (f) != old_tab_bar_height)
10223 && !f->after_make_frame 10226 && !f->after_make_frame
10224 && (EQ (frame_inhibit_implied_resize, Qt) 10227 && (EQ (frame_inhibit_implied_resize, Qt)
10225 || (CONSP (frame_inhibit_implied_resize) 10228 || (CONSP (frame_inhibit_implied_resize)
10226 && NILP (Fmemq (Qfont, frame_inhibit_implied_resize)))) 10229 && NILP (Fmemq (Qfont, frame_inhibit_implied_resize))))
10227 && (NILP (fullscreen = get_frame_param (f, Qfullscreen)) 10230 && (NILP (fullscreen = get_frame_param (f, Qfullscreen))
10228 || EQ (fullscreen, Qfullwidth))) 10231 || EQ (fullscreen, Qfullwidth)))
10229 /* If the menu bar height changes, try to keep text height 10232 /* If the menu/tab bar height changes, try to keep text height
10230 constant. */ 10233 constant. */
10231 adjust_frame_size 10234 adjust_frame_size
10232 (f, -1, FRAME_TEXT_HEIGHT (f) + FRAME_MENU_BAR_HEIGHT (f) 10235 (f, -1, FRAME_TEXT_HEIGHT (f) + FRAME_MENU_BAR_HEIGHT (f) + FRAME_TAB_BAR_HEIGHT (f)
10233 - old_menu_bar_height, 1, false, Qfont); 10236 - old_menu_bar_height - old_tab_bar_height, 1, false, Qfont);
10234#endif /* USE_X_TOOLKIT */ 10237#endif /* USE_X_TOOLKIT */
10235 } 10238 }
10236 } 10239 }
@@ -11165,7 +11168,7 @@ x_check_fullscreen (struct frame *f)
11165 case FULLSCREEN_WIDTH: 11168 case FULLSCREEN_WIDTH:
11166 lval = Qfullwidth; 11169 lval = Qfullwidth;
11167 width = x_display_pixel_width (dpyinfo); 11170 width = x_display_pixel_width (dpyinfo);
11168 height = height + FRAME_MENUBAR_HEIGHT (f); 11171 height = height + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f);
11169 break; 11172 break;
11170 case FULLSCREEN_HEIGHT: 11173 case FULLSCREEN_HEIGHT:
11171 lval = Qfullheight; 11174 lval = Qfullheight;
@@ -11187,7 +11190,7 @@ x_check_fullscreen (struct frame *f)
11187 x_wait_for_event (f, ConfigureNotify); 11190 x_wait_for_event (f, ConfigureNotify);
11188 else 11191 else
11189 { 11192 {
11190 change_frame_size (f, width, height - FRAME_MENUBAR_HEIGHT (f), 11193 change_frame_size (f, width, height - FRAME_MENUBAR_HEIGHT (f) - FRAME_TABBAR_HEIGHT (f),
11191 false, true, false, true); 11194 false, true, false, true);
11192 x_sync (f); 11195 x_sync (f);
11193 } 11196 }
@@ -11363,10 +11366,10 @@ x_set_window_size_1 (struct frame *f, bool change_gravity,
11363 { 11366 {
11364 frame_size_history_add 11367 frame_size_history_add
11365 (f, Qx_set_window_size_1, width, height, 11368 (f, Qx_set_window_size_1, width, height,
11366 list2i (old_height, pixelheight + FRAME_MENUBAR_HEIGHT (f))); 11369 list2i (old_height, pixelheight + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f)));
11367 11370
11368 XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), 11371 XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
11369 old_width, pixelheight + FRAME_MENUBAR_HEIGHT (f)); 11372 old_width, pixelheight + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f));
11370 } 11373 }
11371 else if (EQ (fullscreen, Qfullheight) && height == FRAME_TEXT_HEIGHT (f)) 11374 else if (EQ (fullscreen, Qfullheight) && height == FRAME_TEXT_HEIGHT (f))
11372 { 11375 {
@@ -11382,15 +11385,12 @@ x_set_window_size_1 (struct frame *f, bool change_gravity,
11382 { 11385 {
11383 frame_size_history_add 11386 frame_size_history_add
11384 (f, Qx_set_window_size_3, width, height, 11387 (f, Qx_set_window_size_3, width, height,
11385 list3i (pixelwidth + FRAME_TOOLBAR_WIDTH (f) 11388 list3i (pixelwidth + FRAME_TOOLBAR_WIDTH (f) + FRAME_TABBAR_WIDTH (f),
11386 + FRAME_TABBAR_WIDTH (f), 11389 (pixelheight + FRAME_TOOLBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f)),
11387 (pixelheight + FRAME_TOOLBAR_HEIGHT (f) 11390 FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f)));
11388 + FRAME_TABBAR_HEIGHT (f)
11389 + FRAME_MENUBAR_HEIGHT (f)),
11390 FRAME_MENUBAR_HEIGHT (f)));
11391 11391
11392 XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), 11392 XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
11393 pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f)); 11393 pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f));
11394 fullscreen = Qnil; 11394 fullscreen = Qnil;
11395 } 11395 }
11396 11396
@@ -11467,7 +11467,7 @@ x_set_window_size (struct frame *f, bool change_gravity,
11467#ifdef USE_X_TOOLKIT 11467#ifdef USE_X_TOOLKIT
11468 /* The menu bar is not part of text lines. The tool bar 11468 /* The menu bar is not part of text lines. The tool bar
11469 is however. */ 11469 is however. */
11470 pixelh -= FRAME_MENUBAR_HEIGHT (f); 11470 pixelh -= FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f);
11471#endif 11471#endif
11472 text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, FRAME_PIXEL_WIDTH (f)); 11472 text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, FRAME_PIXEL_WIDTH (f));
11473 text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, pixelh); 11473 text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, pixelh);
@@ -12085,6 +12085,7 @@ x_free_frame_resources (struct frame *f)
12085 XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); 12085 XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
12086 12086
12087 free_frame_menubar (f); 12087 free_frame_menubar (f);
12088 free_frame_tab_bar (f);
12088 12089
12089 if (f->shell_position) 12090 if (f->shell_position)
12090 xfree (f->shell_position); 12091 xfree (f->shell_position);
@@ -12263,7 +12264,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
12263 12264
12264 size_hints.flags |= PBaseSize; 12265 size_hints.flags |= PBaseSize;
12265 size_hints.base_width = base_width; 12266 size_hints.base_width = base_width;
12266 size_hints.base_height = base_height + FRAME_MENUBAR_HEIGHT (f); 12267 size_hints.base_height = base_height + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f);
12267 size_hints.min_width = base_width; 12268 size_hints.min_width = base_width;
12268 size_hints.min_height = base_height; 12269 size_hints.min_height = base_height;
12269 } 12270 }