diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispextern.h | 31 | ||||
| -rw-r--r-- | src/dispnew.c | 24 | ||||
| -rw-r--r-- | src/frame.c | 31 | ||||
| -rw-r--r-- | src/fringe.c | 12 | ||||
| -rw-r--r-- | src/gtkutil.c | 8 | ||||
| -rw-r--r-- | src/keyboard.c | 87 | ||||
| -rw-r--r-- | src/keymap.c | 3 | ||||
| -rw-r--r-- | src/term.c | 3 | ||||
| -rw-r--r-- | src/w32term.c | 3 | ||||
| -rw-r--r-- | src/window.c | 22 | ||||
| -rw-r--r-- | src/xdisp.c | 52 | ||||
| -rw-r--r-- | src/xfaces.c | 2 | ||||
| -rw-r--r-- | src/xfns.c | 1 | ||||
| -rw-r--r-- | src/xterm.c | 30 | ||||
| -rw-r--r-- | src/xterm.h | 24 |
15 files changed, 110 insertions, 223 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 02aba05ccb4..817f8c77d97 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -3200,48 +3200,17 @@ enum tab_bar_item_idx | |||
| 3200 | /* Caption. */ | 3200 | /* Caption. */ |
| 3201 | TAB_BAR_ITEM_CAPTION, | 3201 | TAB_BAR_ITEM_CAPTION, |
| 3202 | 3202 | ||
| 3203 | /* Image(s) to display. This is either a single image specification | ||
| 3204 | or a vector of specifications. */ | ||
| 3205 | TAB_BAR_ITEM_IMAGES, | ||
| 3206 | |||
| 3207 | /* The binding. */ | 3203 | /* The binding. */ |
| 3208 | TAB_BAR_ITEM_BINDING, | 3204 | TAB_BAR_ITEM_BINDING, |
| 3209 | 3205 | ||
| 3210 | /* Button type. One of nil (default button), t (a separator), | ||
| 3211 | `:radio', or `:toggle'. The latter two currently do nothing. */ | ||
| 3212 | TAB_BAR_ITEM_TYPE, | ||
| 3213 | |||
| 3214 | /* Help string. */ | 3206 | /* Help string. */ |
| 3215 | TAB_BAR_ITEM_HELP, | 3207 | TAB_BAR_ITEM_HELP, |
| 3216 | 3208 | ||
| 3217 | /* Icon file name of right to left image when an RTL locale is used. */ | ||
| 3218 | TAB_BAR_ITEM_RTL_IMAGE, | ||
| 3219 | |||
| 3220 | /* Label to show when text labels are enabled. */ | ||
| 3221 | TAB_BAR_ITEM_LABEL, | ||
| 3222 | |||
| 3223 | /* If we shall show the label only below the icon and not beside it. */ | ||
| 3224 | TAB_BAR_ITEM_VERT_ONLY, | ||
| 3225 | |||
| 3226 | /* Sentinel = number of slots in tab_bar_items occupied by one | 3209 | /* Sentinel = number of slots in tab_bar_items occupied by one |
| 3227 | tab-bar item. */ | 3210 | tab-bar item. */ |
| 3228 | TAB_BAR_ITEM_NSLOTS | 3211 | TAB_BAR_ITEM_NSLOTS |
| 3229 | }; | 3212 | }; |
| 3230 | 3213 | ||
| 3231 | |||
| 3232 | /* An enumeration for the different images that can be specified | ||
| 3233 | for a tab-bar item. */ | ||
| 3234 | |||
| 3235 | enum tab_bar_item_image | ||
| 3236 | { | ||
| 3237 | TAB_BAR_IMAGE_ENABLED_SELECTED, | ||
| 3238 | TAB_BAR_IMAGE_ENABLED_DESELECTED, | ||
| 3239 | TAB_BAR_IMAGE_DISABLED_SELECTED, | ||
| 3240 | TAB_BAR_IMAGE_DISABLED_DESELECTED | ||
| 3241 | }; | ||
| 3242 | |||
| 3243 | #define DEFAULT_TAB_BAR_LABEL_SIZE 14 | ||
| 3244 | |||
| 3245 | /* Default values of the above variables. */ | 3214 | /* Default values of the above variables. */ |
| 3246 | 3215 | ||
| 3247 | #define DEFAULT_TAB_BAR_BUTTON_MARGIN 4 | 3216 | #define DEFAULT_TAB_BAR_BUTTON_MARGIN 4 |
diff --git a/src/dispnew.c b/src/dispnew.c index 7e89a855bbb..4cf131522ec 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -456,8 +456,10 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 456 | || (row == matrix->rows + dim.height - 1 | 456 | || (row == matrix->rows + dim.height - 1 |
| 457 | && window_wants_mode_line (w)) | 457 | && window_wants_mode_line (w)) |
| 458 | || (row == matrix->rows && matrix->tab_line_p) | 458 | || (row == matrix->rows && matrix->tab_line_p) |
| 459 | || (row == matrix->rows && !matrix->tab_line_p && matrix->header_line_p) | 459 | || (row == matrix->rows |
| 460 | || (row == (matrix->rows + 1) && matrix->tab_line_p && matrix->header_line_p)) | 460 | && !matrix->tab_line_p && matrix->header_line_p) |
| 461 | || (row == (matrix->rows + 1) | ||
| 462 | && matrix->tab_line_p && matrix->header_line_p)) | ||
| 461 | { | 463 | { |
| 462 | row->glyphs[TEXT_AREA] | 464 | row->glyphs[TEXT_AREA] |
| 463 | = row->glyphs[LEFT_MARGIN_AREA]; | 465 | = row->glyphs[LEFT_MARGIN_AREA]; |
| @@ -504,8 +506,10 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 504 | if ((row == matrix->rows + dim.height - 1 | 506 | if ((row == matrix->rows + dim.height - 1 |
| 505 | && !(w && window_wants_mode_line (w))) | 507 | && !(w && window_wants_mode_line (w))) |
| 506 | || (row == matrix->rows && matrix->tab_line_p) | 508 | || (row == matrix->rows && matrix->tab_line_p) |
| 507 | || (row == matrix->rows && !matrix->tab_line_p && matrix->header_line_p) | 509 | || (row == matrix->rows |
| 508 | || (row == (matrix->rows + 1) && matrix->tab_line_p && matrix->header_line_p)) | 510 | && !matrix->tab_line_p && matrix->header_line_p) |
| 511 | || (row == (matrix->rows + 1) | ||
| 512 | && matrix->tab_line_p && matrix->header_line_p)) | ||
| 509 | { | 513 | { |
| 510 | row->glyphs[TEXT_AREA] | 514 | row->glyphs[TEXT_AREA] |
| 511 | = row->glyphs[LEFT_MARGIN_AREA]; | 515 | = row->glyphs[LEFT_MARGIN_AREA]; |
| @@ -3550,7 +3554,8 @@ update_window (struct window *w, bool force_p) | |||
| 3550 | /* Try reusing part of the display by copying. */ | 3554 | /* Try reusing part of the display by copying. */ |
| 3551 | if (row < end && !desired_matrix->no_scrolling_p) | 3555 | if (row < end && !desired_matrix->no_scrolling_p) |
| 3552 | { | 3556 | { |
| 3553 | int rc = scrolling_window (w, (tab_line_row != NULL ? 1 : 0) + (header_line_row != NULL ? 1 : 0)); | 3557 | int rc = scrolling_window (w, (tab_line_row != NULL ? 1 : 0) |
| 3558 | + (header_line_row != NULL ? 1 : 0)); | ||
| 3554 | if (rc < 0) | 3559 | if (rc < 0) |
| 3555 | { | 3560 | { |
| 3556 | /* All rows were found to be equal. */ | 3561 | /* All rows were found to be equal. */ |
| @@ -5428,7 +5433,8 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5428 | start position, i.e. it excludes the header-line row, but | 5433 | start position, i.e. it excludes the header-line row, but |
| 5429 | MATRIX_ROW includes the header-line row. Adjust for a possible | 5434 | MATRIX_ROW includes the header-line row. Adjust for a possible |
| 5430 | header-line row. */ | 5435 | header-line row. */ |
| 5431 | it_vpos = it.vpos + window_wants_header_line (w) + window_wants_tab_line (w); | 5436 | it_vpos = it.vpos + window_wants_header_line (w) |
| 5437 | + window_wants_tab_line (w); | ||
| 5432 | if (it_vpos < w->current_matrix->nrows | 5438 | if (it_vpos < w->current_matrix->nrows |
| 5433 | && (row = MATRIX_ROW (w->current_matrix, it_vpos), | 5439 | && (row = MATRIX_ROW (w->current_matrix, it_vpos), |
| 5434 | row->enabled_p)) | 5440 | row->enabled_p)) |
| @@ -5675,7 +5681,8 @@ handle_window_change_signal (int sig) | |||
| 5675 | structures now. Let that be done later outside of the | 5681 | structures now. Let that be done later outside of the |
| 5676 | signal handler. */ | 5682 | signal handler. */ |
| 5677 | change_frame_size (XFRAME (frame), width, | 5683 | change_frame_size (XFRAME (frame), width, |
| 5678 | height - FRAME_MENU_BAR_LINES (XFRAME (frame)) - FRAME_TAB_BAR_LINES (XFRAME (frame)), | 5684 | height - FRAME_MENU_BAR_LINES (XFRAME (frame)) |
| 5685 | - FRAME_TAB_BAR_LINES (XFRAME (frame)), | ||
| 5679 | 0, 1, 0, 0); | 5686 | 0, 1, 0, 0); |
| 5680 | } | 5687 | } |
| 5681 | } | 5688 | } |
| @@ -6355,7 +6362,8 @@ init_display_interactive (void) | |||
| 6355 | change_frame_size (XFRAME (selected_frame), | 6362 | change_frame_size (XFRAME (selected_frame), |
| 6356 | FrameCols (t->display_info.tty), | 6363 | FrameCols (t->display_info.tty), |
| 6357 | FrameRows (t->display_info.tty) | 6364 | FrameRows (t->display_info.tty) |
| 6358 | - FRAME_MENU_BAR_LINES (f) - FRAME_TAB_BAR_LINES (f), 0, 0, 1, 0); | 6365 | - FRAME_MENU_BAR_LINES (f) |
| 6366 | - FRAME_TAB_BAR_LINES (f), 0, 0, 1, 0); | ||
| 6359 | 6367 | ||
| 6360 | /* Delete the initial terminal. */ | 6368 | /* Delete the initial terminal. */ |
| 6361 | if (--initial_terminal->reference_count == 0 | 6369 | if (--initial_terminal->reference_count == 0 |
diff --git a/src/frame.c b/src/frame.c index 5caa3f46714..d72dfec0cf8 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1191,10 +1191,12 @@ make_terminal_frame (struct terminal *terminal) | |||
| 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_TAB_BAR_LINES (f) = NILP (Vtab_bar_mode) ? 0 : 1; | 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_LINES (f) = FRAME_LINES (f) - FRAME_MENU_BAR_LINES (f) |
| 1195 | - FRAME_TAB_BAR_LINES (f); | ||
| 1195 | FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); | 1196 | FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); |
| 1196 | FRAME_TAB_BAR_HEIGHT (f) = FRAME_TAB_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); | 1197 | 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); | 1198 | FRAME_TEXT_HEIGHT (f) = FRAME_TEXT_HEIGHT (f) - FRAME_MENU_BAR_HEIGHT (f) |
| 1199 | - FRAME_TAB_BAR_HEIGHT (f); | ||
| 1198 | 1200 | ||
| 1199 | /* Set the top frame to the newly created frame. */ | 1201 | /* Set the top frame to the newly created frame. */ |
| 1200 | if (FRAMEP (FRAME_TTY (f)->top_frame) | 1202 | if (FRAMEP (FRAME_TTY (f)->top_frame) |
| @@ -1316,7 +1318,8 @@ affects all frames on the same terminal device. */) | |||
| 1316 | { | 1318 | { |
| 1317 | int width, height; | 1319 | int width, height; |
| 1318 | get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height); | 1320 | get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height); |
| 1319 | adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f) - FRAME_TAB_BAR_LINES (f), | 1321 | adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f) |
| 1322 | - FRAME_TAB_BAR_LINES (f), | ||
| 1320 | 5, 0, Qterminal_frame); | 1323 | 5, 0, Qterminal_frame); |
| 1321 | } | 1324 | } |
| 1322 | 1325 | ||
| @@ -3444,23 +3447,6 @@ to `frame-height'). */) | |||
| 3444 | return make_fixnum (FRAME_TOTAL_LINES (f)); | 3447 | return make_fixnum (FRAME_TOTAL_LINES (f)); |
| 3445 | } | 3448 | } |
| 3446 | 3449 | ||
| 3447 | DEFUN ("tab-bar-pixel-width", Ftab_bar_pixel_width, | ||
| 3448 | Stab_bar_pixel_width, 0, 1, 0, | ||
| 3449 | doc: /* Return width in pixels of FRAME's tab bar. | ||
| 3450 | The result is greater than zero only when the tab bar is on the left | ||
| 3451 | or right side of FRAME. If FRAME is omitted or nil, the selected frame | ||
| 3452 | is used. */) | ||
| 3453 | (Lisp_Object frame) | ||
| 3454 | { | ||
| 3455 | #ifdef FRAME_TABBAR_WIDTH | ||
| 3456 | struct frame *f = decode_any_frame (frame); | ||
| 3457 | |||
| 3458 | if (FRAME_WINDOW_P (f)) | ||
| 3459 | return make_fixnum (FRAME_TABBAR_WIDTH (f)); | ||
| 3460 | #endif | ||
| 3461 | return make_fixnum (0); | ||
| 3462 | } | ||
| 3463 | |||
| 3464 | DEFUN ("tool-bar-pixel-width", Ftool_bar_pixel_width, | 3450 | DEFUN ("tool-bar-pixel-width", Ftool_bar_pixel_width, |
| 3465 | Stool_bar_pixel_width, 0, 1, 0, | 3451 | Stool_bar_pixel_width, 0, 1, 0, |
| 3466 | doc: /* Return width in pixels of FRAME's tool bar. | 3452 | doc: /* Return width in pixels of FRAME's tool bar. |
| @@ -5464,8 +5450,8 @@ On Nextstep, this just calls `ns-parse-geometry'. */) | |||
| 5464 | #define DEFAULT_COLS 80 | 5450 | #define DEFAULT_COLS 80 |
| 5465 | 5451 | ||
| 5466 | long | 5452 | long |
| 5467 | gui_figure_window_size (struct frame *f, Lisp_Object parms, bool tabbar_p, bool toolbar_p, | 5453 | gui_figure_window_size (struct frame *f, Lisp_Object parms, bool tabbar_p, |
| 5468 | int *x_width, int *x_height) | 5454 | bool toolbar_p, int *x_width, int *x_height) |
| 5469 | { | 5455 | { |
| 5470 | Lisp_Object height, width, user_size, top, left, user_position; | 5456 | Lisp_Object height, width, user_size, top, left, user_position; |
| 5471 | long window_prompting = 0; | 5457 | long window_prompting = 0; |
| @@ -6425,7 +6411,6 @@ iconify the top level frame instead. */); | |||
| 6425 | defsubr (&Sframe_internal_border_width); | 6411 | defsubr (&Sframe_internal_border_width); |
| 6426 | defsubr (&Sright_divider_width); | 6412 | defsubr (&Sright_divider_width); |
| 6427 | defsubr (&Sbottom_divider_width); | 6413 | defsubr (&Sbottom_divider_width); |
| 6428 | defsubr (&Stab_bar_pixel_width); | ||
| 6429 | defsubr (&Stool_bar_pixel_width); | 6414 | defsubr (&Stool_bar_pixel_width); |
| 6430 | defsubr (&Sset_frame_height); | 6415 | defsubr (&Sset_frame_height); |
| 6431 | defsubr (&Sset_frame_width); | 6416 | defsubr (&Sset_frame_width); |
diff --git a/src/fringe.c b/src/fringe.c index 2735ae70f94..22f3bdc2ba8 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -634,7 +634,8 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o | |||
| 634 | /* Clear left fringe if no bitmap to draw or if bitmap doesn't fill | 634 | /* Clear left fringe if no bitmap to draw or if bitmap doesn't fill |
| 635 | the fringe. */ | 635 | the fringe. */ |
| 636 | p.bx = -1; | 636 | p.bx = -1; |
| 637 | header_line_height = WINDOW_TAB_LINE_HEIGHT (w) + WINDOW_HEADER_LINE_HEIGHT (w); | 637 | header_line_height = WINDOW_TAB_LINE_HEIGHT (w) |
| 638 | + WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 638 | p.by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); | 639 | p.by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); |
| 639 | p.ny = row->visible_height; | 640 | p.ny = row->visible_height; |
| 640 | if (left_p) | 641 | if (left_p) |
| @@ -1091,7 +1092,8 @@ update_window_fringes (struct window *w, bool keep_current_p) | |||
| 1091 | struct glyph_row *row1; | 1092 | struct glyph_row *row1; |
| 1092 | int top_ind_max_y; | 1093 | int top_ind_max_y; |
| 1093 | 1094 | ||
| 1094 | top_ind_min_y = WINDOW_TAB_LINE_HEIGHT (w) + WINDOW_HEADER_LINE_HEIGHT (w); | 1095 | top_ind_min_y = WINDOW_TAB_LINE_HEIGHT (w) |
| 1096 | + WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 1095 | top_ind_max_y = top_ind_min_y + fb->height; | 1097 | top_ind_max_y = top_ind_min_y + fb->height; |
| 1096 | if (top_ind_max_y > yb) | 1098 | if (top_ind_max_y > yb) |
| 1097 | top_ind_max_y = yb; | 1099 | top_ind_max_y = yb; |
| @@ -1148,8 +1150,10 @@ update_window_fringes (struct window *w, bool keep_current_p) | |||
| 1148 | 1150 | ||
| 1149 | bot_ind_max_y = row->y + row->visible_height; | 1151 | bot_ind_max_y = row->y + row->visible_height; |
| 1150 | bot_ind_min_y = bot_ind_max_y - fb->height; | 1152 | bot_ind_min_y = bot_ind_max_y - fb->height; |
| 1151 | if (bot_ind_min_y < WINDOW_TAB_LINE_HEIGHT (w) + WINDOW_HEADER_LINE_HEIGHT (w)) | 1153 | if (bot_ind_min_y < WINDOW_TAB_LINE_HEIGHT (w) |
| 1152 | bot_ind_min_y = WINDOW_TAB_LINE_HEIGHT (w) + WINDOW_HEADER_LINE_HEIGHT (w); | 1154 | + WINDOW_HEADER_LINE_HEIGHT (w)) |
| 1155 | bot_ind_min_y = WINDOW_TAB_LINE_HEIGHT (w) | ||
| 1156 | + WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 1153 | 1157 | ||
| 1154 | for (y = row->y, rn = bot_ind_rn - 1; | 1158 | for (y = row->y, rn = bot_ind_rn - 1; |
| 1155 | y >= bot_ind_min_y && rn >= 0; | 1159 | y >= bot_ind_min_y && rn >= 0; |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 8a2fc3aa16d..16d765533a7 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -951,8 +951,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height) | |||
| 951 | Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); | 951 | Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); |
| 952 | gint gwidth, gheight; | 952 | gint gwidth, gheight; |
| 953 | int totalheight | 953 | int totalheight |
| 954 | = pixelheight + FRAME_TOOLBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f); | 954 | = pixelheight + FRAME_TOOLBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f); |
| 955 | int totalwidth = pixelwidth + FRAME_TABBAR_WIDTH (f) + FRAME_TOOLBAR_WIDTH (f); | 955 | int totalwidth = pixelwidth + FRAME_TOOLBAR_WIDTH (f); |
| 956 | 956 | ||
| 957 | if (FRAME_PIXEL_HEIGHT (f) == 0) | 957 | if (FRAME_PIXEL_HEIGHT (f) == 0) |
| 958 | return; | 958 | return; |
| @@ -1437,9 +1437,9 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position) | |||
| 1437 | /* Use one row/col here so base_height/width does not become zero. | 1437 | /* Use one row/col here so base_height/width does not become zero. |
| 1438 | Gtk+ and/or Unity on Ubuntu 12.04 can't handle it. | 1438 | Gtk+ and/or Unity on Ubuntu 12.04 can't handle it. |
| 1439 | Obviously this makes the row/col value displayed off by 1. */ | 1439 | Obviously this makes the row/col value displayed off by 1. */ |
| 1440 | base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1) + FRAME_TABBAR_WIDTH (f) + FRAME_TOOLBAR_WIDTH (f); | 1440 | base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1) + FRAME_TOOLBAR_WIDTH (f); |
| 1441 | base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1) | 1441 | base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1) |
| 1442 | + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); | 1442 | + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); |
| 1443 | 1443 | ||
| 1444 | size_hints.base_width = base_width; | 1444 | size_hints.base_width = base_width; |
| 1445 | size_hints.base_height = base_height; | 1445 | size_hints.base_height = base_height; |
diff --git a/src/keyboard.c b/src/keyboard.c index 51040f067df..8b7c473690d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2385,7 +2385,8 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2385 | if (used_mouse_menu | 2385 | if (used_mouse_menu |
| 2386 | /* Also check was_disabled so last-nonmenu-event won't return | 2386 | /* Also check was_disabled so last-nonmenu-event won't return |
| 2387 | a bad value when submenus are involved. (Bug#447) */ | 2387 | a bad value when submenus are involved. (Bug#447) */ |
| 2388 | && (EQ (c, Qtool_bar) || EQ (c, Qtab_bar) || EQ (c, Qmenu_bar) || was_disabled)) | 2388 | && (EQ (c, Qtool_bar) || EQ (c, Qtab_bar) || EQ (c, Qmenu_bar) |
| 2389 | || was_disabled)) | ||
| 2389 | *used_mouse_menu = true; | 2390 | *used_mouse_menu = true; |
| 2390 | 2391 | ||
| 2391 | goto reread_for_input_method; | 2392 | goto reread_for_input_method; |
| @@ -5043,14 +5044,15 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, | |||
| 5043 | /* For mode line and header line clicks, return X, Y relative to | 5044 | /* For mode line and header line clicks, return X, Y relative to |
| 5044 | the left window edge. Use mode_line_string to look for a | 5045 | the left window edge. Use mode_line_string to look for a |
| 5045 | string on the click position. */ | 5046 | string on the click position. */ |
| 5046 | else if (part == ON_MODE_LINE || part == ON_TAB_LINE || part == ON_HEADER_LINE) | 5047 | else if (part == ON_MODE_LINE || part == ON_TAB_LINE |
| 5048 | || part == ON_HEADER_LINE) | ||
| 5047 | { | 5049 | { |
| 5048 | Lisp_Object string; | 5050 | Lisp_Object string; |
| 5049 | ptrdiff_t charpos; | 5051 | ptrdiff_t charpos; |
| 5050 | 5052 | ||
| 5051 | posn = (part == ON_MODE_LINE ? Qmode_line | 5053 | posn = (part == ON_MODE_LINE ? Qmode_line |
| 5052 | : (part == ON_TAB_LINE ? Qtab_line | 5054 | : (part == ON_TAB_LINE ? Qtab_line |
| 5053 | : Qheader_line)); | 5055 | : Qheader_line)); |
| 5054 | 5056 | ||
| 5055 | /* Note that mode_line_string takes COL, ROW as pixels and | 5057 | /* Note that mode_line_string takes COL, ROW as pixels and |
| 5056 | converts them to characters. */ | 5058 | converts them to characters. */ |
| @@ -8115,7 +8117,6 @@ parse_tab_bar_item (Lisp_Object key, Lisp_Object item) | |||
| 8115 | Lisp_Object filter = Qnil; | 8117 | Lisp_Object filter = Qnil; |
| 8116 | Lisp_Object caption; | 8118 | Lisp_Object caption; |
| 8117 | int i; | 8119 | int i; |
| 8118 | bool have_label = false; | ||
| 8119 | 8120 | ||
| 8120 | /* Definition looks like `(menu-item CAPTION BINDING PROPS...)'. | 8121 | /* Definition looks like `(menu-item CAPTION BINDING PROPS...)'. |
| 8121 | Rule out items that aren't lists, don't start with | 8122 | Rule out items that aren't lists, don't start with |
| @@ -8164,12 +8165,6 @@ parse_tab_bar_item (Lisp_Object key, Lisp_Object item) | |||
| 8164 | { | 8165 | { |
| 8165 | if (menu_separator_name_p (SSDATA (caption))) | 8166 | if (menu_separator_name_p (SSDATA (caption))) |
| 8166 | { | 8167 | { |
| 8167 | set_prop_tab_bar (TAB_BAR_ITEM_TYPE, Qt); | ||
| 8168 | /* If we use build_desired_tab_bar_string to render the | ||
| 8169 | tab bar, the separator is rendered as an image. */ | ||
| 8170 | set_prop_tab_bar (TAB_BAR_ITEM_IMAGES, | ||
| 8171 | (menu_item_eval_property | ||
| 8172 | (Vtab_bar_separator_image_expression))); | ||
| 8173 | set_prop_tab_bar (TAB_BAR_ITEM_ENABLED_P, Qnil); | 8168 | set_prop_tab_bar (TAB_BAR_ITEM_ENABLED_P, Qnil); |
| 8174 | set_prop_tab_bar (TAB_BAR_ITEM_SELECTED_P, Qnil); | 8169 | set_prop_tab_bar (TAB_BAR_ITEM_SELECTED_P, Qnil); |
| 8175 | set_prop_tab_bar (TAB_BAR_ITEM_CAPTION, Qnil); | 8170 | set_prop_tab_bar (TAB_BAR_ITEM_CAPTION, Qnil); |
| @@ -8212,17 +8207,6 @@ parse_tab_bar_item (Lisp_Object key, Lisp_Object item) | |||
| 8212 | else if (EQ (ikey, QChelp)) | 8207 | else if (EQ (ikey, QChelp)) |
| 8213 | /* `:help HELP-STRING'. */ | 8208 | /* `:help HELP-STRING'. */ |
| 8214 | set_prop_tab_bar (TAB_BAR_ITEM_HELP, value); | 8209 | set_prop_tab_bar (TAB_BAR_ITEM_HELP, value); |
| 8215 | else if (EQ (ikey, QCvert_only)) | ||
| 8216 | /* `:vert-only t/nil'. */ | ||
| 8217 | set_prop_tab_bar (TAB_BAR_ITEM_VERT_ONLY, value); | ||
| 8218 | else if (EQ (ikey, QClabel)) | ||
| 8219 | { | ||
| 8220 | const char *bad_label = "!!?GARBLED ITEM?!!"; | ||
| 8221 | /* `:label LABEL-STRING'. */ | ||
| 8222 | set_prop_tab_bar (TAB_BAR_ITEM_LABEL, | ||
| 8223 | STRINGP (value) ? value : build_string (bad_label)); | ||
| 8224 | have_label = true; | ||
| 8225 | } | ||
| 8226 | else if (EQ (ikey, QCfilter)) | 8210 | else if (EQ (ikey, QCfilter)) |
| 8227 | /* ':filter FORM'. */ | 8211 | /* ':filter FORM'. */ |
| 8228 | filter = value; | 8212 | filter = value; |
| @@ -8236,64 +8220,8 @@ parse_tab_bar_item (Lisp_Object key, Lisp_Object item) | |||
| 8236 | if (EQ (type, QCtoggle) || EQ (type, QCradio)) | 8220 | if (EQ (type, QCtoggle) || EQ (type, QCradio)) |
| 8237 | { | 8221 | { |
| 8238 | set_prop_tab_bar (TAB_BAR_ITEM_SELECTED_P, selected); | 8222 | set_prop_tab_bar (TAB_BAR_ITEM_SELECTED_P, selected); |
| 8239 | set_prop_tab_bar (TAB_BAR_ITEM_TYPE, type); | ||
| 8240 | } | 8223 | } |
| 8241 | } | 8224 | } |
| 8242 | else if (EQ (ikey, QCimage) | ||
| 8243 | && (CONSP (value) | ||
| 8244 | || (VECTORP (value) && ASIZE (value) == 4))) | ||
| 8245 | /* Value is either a single image specification or a vector | ||
| 8246 | of 4 such specifications for the different button states. */ | ||
| 8247 | set_prop_tab_bar (TAB_BAR_ITEM_IMAGES, value); | ||
| 8248 | else if (EQ (ikey, QCrtl)) | ||
| 8249 | /* ':rtl STRING' */ | ||
| 8250 | set_prop_tab_bar (TAB_BAR_ITEM_RTL_IMAGE, value); | ||
| 8251 | } | ||
| 8252 | |||
| 8253 | |||
| 8254 | if (!have_label) | ||
| 8255 | { | ||
| 8256 | /* Try to make one from caption and key. */ | ||
| 8257 | Lisp_Object tkey = PROP (TAB_BAR_ITEM_KEY); | ||
| 8258 | Lisp_Object tcapt = PROP (TAB_BAR_ITEM_CAPTION); | ||
| 8259 | const char *label = SYMBOLP (tkey) ? SSDATA (SYMBOL_NAME (tkey)) : ""; | ||
| 8260 | const char *capt = STRINGP (tcapt) ? SSDATA (tcapt) : ""; | ||
| 8261 | ptrdiff_t max_lbl_size = | ||
| 8262 | 2 * max (0, min (tab_bar_max_label_size, STRING_BYTES_BOUND / 2)) + 1; | ||
| 8263 | char *buf = xmalloc (max_lbl_size); | ||
| 8264 | Lisp_Object new_lbl; | ||
| 8265 | ptrdiff_t caption_len = strnlen (capt, max_lbl_size); | ||
| 8266 | |||
| 8267 | if (0 < caption_len && caption_len < max_lbl_size) | ||
| 8268 | { | ||
| 8269 | strcpy (buf, capt); | ||
| 8270 | while (caption_len > 0 && buf[caption_len - 1] == '.') | ||
| 8271 | caption_len--; | ||
| 8272 | buf[caption_len] = '\0'; | ||
| 8273 | label = capt = buf; | ||
| 8274 | } | ||
| 8275 | |||
| 8276 | ptrdiff_t label_len = strnlen (label, max_lbl_size); | ||
| 8277 | if (0 < label_len && label_len < max_lbl_size) | ||
| 8278 | { | ||
| 8279 | ptrdiff_t j; | ||
| 8280 | if (label != buf) | ||
| 8281 | strcpy (buf, label); | ||
| 8282 | |||
| 8283 | for (j = 0; buf[j] != '\0'; ++j) | ||
| 8284 | if (buf[j] == '-') | ||
| 8285 | buf[j] = ' '; | ||
| 8286 | label = buf; | ||
| 8287 | } | ||
| 8288 | else | ||
| 8289 | label = ""; | ||
| 8290 | |||
| 8291 | new_lbl = Fupcase_initials (build_string (label)); | ||
| 8292 | if (SCHARS (new_lbl) <= tab_bar_max_label_size) | ||
| 8293 | set_prop_tab_bar (TAB_BAR_ITEM_LABEL, new_lbl); | ||
| 8294 | else | ||
| 8295 | set_prop_tab_bar (TAB_BAR_ITEM_LABEL, empty_unibyte_string); | ||
| 8296 | xfree (buf); | ||
| 8297 | } | 8225 | } |
| 8298 | 8226 | ||
| 8299 | /* If got a filter apply it on binding. */ | 8227 | /* If got a filter apply it on binding. */ |
| @@ -10711,7 +10639,8 @@ On such systems, Emacs starts a subshell instead of suspending. */) | |||
| 10711 | get_tty_size (fileno (CURTTY ()->input), &width, &height); | 10639 | get_tty_size (fileno (CURTTY ()->input), &width, &height); |
| 10712 | if (width != old_width || height != old_height) | 10640 | if (width != old_width || height != old_height) |
| 10713 | change_frame_size (SELECTED_FRAME (), width, | 10641 | change_frame_size (SELECTED_FRAME (), width, |
| 10714 | height - FRAME_MENU_BAR_LINES (SELECTED_FRAME ()) - FRAME_TAB_BAR_LINES (SELECTED_FRAME ()), | 10642 | height - FRAME_MENU_BAR_LINES (SELECTED_FRAME ()) |
| 10643 | - FRAME_TAB_BAR_LINES (SELECTED_FRAME ()), | ||
| 10715 | 0, 0, 0, 0); | 10644 | 0, 0, 0, 0); |
| 10716 | 10645 | ||
| 10717 | run_hook (intern ("suspend-resume-hook")); | 10646 | run_hook (intern ("suspend-resume-hook")); |
diff --git a/src/keymap.c b/src/keymap.c index c92556ba186..da2786c8449 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -3663,7 +3663,8 @@ be preferred. */); | |||
| 3663 | DEFSYM (Qmode_line, "mode-line"); | 3663 | DEFSYM (Qmode_line, "mode-line"); |
| 3664 | 3664 | ||
| 3665 | staticpro (&Vmouse_events); | 3665 | staticpro (&Vmouse_events); |
| 3666 | Vmouse_events = pure_list (Qmenu_bar, Qtab_bar, Qtool_bar, Qtab_line, Qheader_line, Qmode_line, | 3666 | Vmouse_events = pure_list (Qmenu_bar, Qtab_bar, Qtool_bar, |
| 3667 | Qtab_line, Qheader_line, Qmode_line, | ||
| 3667 | intern_c_string ("mouse-1"), | 3668 | intern_c_string ("mouse-1"), |
| 3668 | intern_c_string ("mouse-2"), | 3669 | intern_c_string ("mouse-2"), |
| 3669 | intern_c_string ("mouse-3"), | 3670 | intern_c_string ("mouse-3"), |
diff --git a/src/term.c b/src/term.c index 6f9ac099907..a189a260788 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2342,7 +2342,8 @@ 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) - FRAME_TAB_BAR_LINES (f), | 2345 | change_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f) |
| 2346 | - FRAME_TAB_BAR_LINES (f), | ||
| 2346 | 0, 0, 0, 0); | 2347 | 0, 0, 0, 0); |
| 2347 | SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1); | 2348 | SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1); |
| 2348 | } | 2349 | } |
diff --git a/src/w32term.c b/src/w32term.c index 4d230a2293c..82256db1721 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -5994,7 +5994,8 @@ w32_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, | |||
| 5994 | = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y) | 5994 | = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y) |
| 5995 | + glyph_row->ascent - w->phys_cursor_ascent); | 5995 | + glyph_row->ascent - w->phys_cursor_ascent); |
| 5996 | w32_system_caret_window = w; | 5996 | w32_system_caret_window = w; |
| 5997 | w32_system_caret_hdr_height = WINDOW_TAB_LINE_HEIGHT (w) + WINDOW_HEADER_LINE_HEIGHT (w); | 5997 | w32_system_caret_hdr_height = WINDOW_TAB_LINE_HEIGHT (w) |
| 5998 | + WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 5998 | w32_system_caret_mode_height = WINDOW_MODE_LINE_HEIGHT (w); | 5999 | w32_system_caret_mode_height = WINDOW_MODE_LINE_HEIGHT (w); |
| 5999 | 6000 | ||
| 6000 | PostMessage (hwnd, WM_IME_STARTCOMPOSITION, 0, 0); | 6001 | PostMessage (hwnd, WM_IME_STARTCOMPOSITION, 0, 0); |
diff --git a/src/window.c b/src/window.c index 6749ffde4c1..1d0716eb776 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1321,7 +1321,8 @@ coordinates_in_window (register struct window *w, int x, int y) | |||
| 1321 | && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) | 1321 | && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) |
| 1322 | && (part = ON_TAB_LINE)) | 1322 | && (part = ON_TAB_LINE)) |
| 1323 | || (window_wants_header_line (w) | 1323 | || (window_wants_header_line (w) |
| 1324 | && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) + CURRENT_HEADER_LINE_HEIGHT (w) | 1324 | && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) |
| 1325 | + CURRENT_HEADER_LINE_HEIGHT (w) | ||
| 1325 | && (part = ON_HEADER_LINE))) | 1326 | && (part = ON_HEADER_LINE))) |
| 1326 | { | 1327 | { |
| 1327 | /* If it's under/over the scroll bar portion of the mode/header | 1328 | /* If it's under/over the scroll bar portion of the mode/header |
| @@ -5808,8 +5809,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) | |||
| 5808 | move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); | 5809 | move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); |
| 5809 | if (IT_CHARPOS (it) == PT | 5810 | if (IT_CHARPOS (it) == PT |
| 5810 | && it.current_y >= this_scroll_margin | 5811 | && it.current_y >= this_scroll_margin |
| 5811 | && it.current_y <= last_y - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w) | 5812 | && it.current_y <= last_y - WINDOW_TAB_LINE_HEIGHT (w) |
| 5812 | && (NILP (Vscroll_preserve_screen_position) | 5813 | - WINDOW_HEADER_LINE_HEIGHT (w) |
| 5814 | && (NILP (Vscroll_preserve_screen_position) | ||
| 5813 | || EQ (Vscroll_preserve_screen_position, Qt))) | 5815 | || EQ (Vscroll_preserve_screen_position, Qt))) |
| 5814 | /* We found PT at a legitimate height. Leave it alone. */ | 5816 | /* We found PT at a legitimate height. Leave it alone. */ |
| 5815 | ; | 5817 | ; |
| @@ -5824,7 +5826,8 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) | |||
| 5824 | is necessary because we set it.current_y to 0, above. */ | 5826 | is necessary because we set it.current_y to 0, above. */ |
| 5825 | move_it_to (&it, -1, | 5827 | move_it_to (&it, -1, |
| 5826 | window_scroll_pixel_based_preserve_x, | 5828 | window_scroll_pixel_based_preserve_x, |
| 5827 | goal_y - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w), | 5829 | goal_y - WINDOW_TAB_LINE_HEIGHT (w) |
| 5830 | - WINDOW_HEADER_LINE_HEIGHT (w), | ||
| 5828 | -1, MOVE_TO_Y | MOVE_TO_X); | 5831 | -1, MOVE_TO_Y | MOVE_TO_X); |
| 5829 | } | 5832 | } |
| 5830 | 5833 | ||
| @@ -5860,8 +5863,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) | |||
| 5860 | /* We subtract WINDOW_HEADER_LINE_HEIGHT because | 5863 | /* We subtract WINDOW_HEADER_LINE_HEIGHT because |
| 5861 | it.y is relative to the bottom of the header | 5864 | it.y is relative to the bottom of the header |
| 5862 | line, see above. */ | 5865 | line, see above. */ |
| 5863 | (it.last_visible_y - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w) | 5866 | (it.last_visible_y - WINDOW_TAB_LINE_HEIGHT (w) |
| 5864 | - partial_line_height (&it) - this_scroll_margin - 1), | 5867 | - WINDOW_HEADER_LINE_HEIGHT (w) |
| 5868 | - partial_line_height (&it) - this_scroll_margin - 1), | ||
| 5865 | -1, | 5869 | -1, |
| 5866 | MOVE_TO_POS | MOVE_TO_Y); | 5870 | MOVE_TO_POS | MOVE_TO_Y); |
| 5867 | 5871 | ||
| @@ -5899,13 +5903,15 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) | |||
| 5899 | if (it.what == IT_EOB) | 5903 | if (it.what == IT_EOB) |
| 5900 | partial_p = | 5904 | partial_p = |
| 5901 | it.current_y + it.ascent + it.descent | 5905 | it.current_y + it.ascent + it.descent |
| 5902 | > it.last_visible_y - this_scroll_margin - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w); | 5906 | > it.last_visible_y - this_scroll_margin |
| 5907 | - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 5903 | else | 5908 | else |
| 5904 | { | 5909 | { |
| 5905 | move_it_by_lines (&it, 1); | 5910 | move_it_by_lines (&it, 1); |
| 5906 | partial_p = | 5911 | partial_p = |
| 5907 | it.current_y | 5912 | it.current_y |
| 5908 | > it.last_visible_y - this_scroll_margin - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w); | 5913 | > it.last_visible_y - this_scroll_margin |
| 5914 | - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 5909 | } | 5915 | } |
| 5910 | 5916 | ||
| 5911 | if (charpos == PT && !partial_p | 5917 | if (charpos == PT && !partial_p |
diff --git a/src/xdisp.c b/src/xdisp.c index 0e18c5adbc6..28ef741f074 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1809,7 +1809,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, | |||
| 1809 | *rowh = max (0, (min (it2.current_y + it2.max_ascent + it2.max_descent, | 1809 | *rowh = max (0, (min (it2.current_y + it2.max_ascent + it2.max_descent, |
| 1810 | it.last_visible_y) | 1810 | it.last_visible_y) |
| 1811 | - max (max (it2.current_y, | 1811 | - max (max (it2.current_y, |
| 1812 | WINDOW_TAB_LINE_HEIGHT (w)), | 1812 | WINDOW_TAB_LINE_HEIGHT (w)), |
| 1813 | WINDOW_HEADER_LINE_HEIGHT (w)))); | 1813 | WINDOW_HEADER_LINE_HEIGHT (w)))); |
| 1814 | *vpos = it2.vpos; | 1814 | *vpos = it2.vpos; |
| 1815 | if (it2.bidi_it.paragraph_dir == R2L) | 1815 | if (it2.bidi_it.paragraph_dir == R2L) |
| @@ -2532,8 +2532,8 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect) | |||
| 2532 | gr = (part == ON_TAB_LINE | 2532 | gr = (part == ON_TAB_LINE |
| 2533 | ? MATRIX_TAB_LINE_ROW (w->current_matrix) | 2533 | ? MATRIX_TAB_LINE_ROW (w->current_matrix) |
| 2534 | : (part == ON_HEADER_LINE | 2534 | : (part == ON_HEADER_LINE |
| 2535 | ? MATRIX_HEADER_LINE_ROW (w->current_matrix) | 2535 | ? MATRIX_HEADER_LINE_ROW (w->current_matrix) |
| 2536 | : MATRIX_MODE_LINE_ROW (w->current_matrix))); | 2536 | : MATRIX_MODE_LINE_ROW (w->current_matrix))); |
| 2537 | gy = gr->y; | 2537 | gy = gr->y; |
| 2538 | area = TEXT_AREA; | 2538 | area = TEXT_AREA; |
| 2539 | goto text_glyph_row_found; | 2539 | goto text_glyph_row_found; |
| @@ -2579,7 +2579,8 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect) | |||
| 2579 | gx += (x / width) * width; | 2579 | gx += (x / width) * width; |
| 2580 | } | 2580 | } |
| 2581 | 2581 | ||
| 2582 | if (part != ON_MODE_LINE && part != ON_HEADER_LINE && part != ON_TAB_LINE) | 2582 | if (part != ON_MODE_LINE && part != ON_HEADER_LINE |
| 2583 | && part != ON_TAB_LINE) | ||
| 2583 | { | 2584 | { |
| 2584 | gx += window_box_left_offset (w, area); | 2585 | gx += window_box_left_offset (w, area); |
| 2585 | /* Don't expand over the modeline to make sure the vertical | 2586 | /* Don't expand over the modeline to make sure the vertical |
| @@ -2594,7 +2595,8 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect) | |||
| 2594 | gx = (x / width) * width; | 2595 | gx = (x / width) * width; |
| 2595 | y -= gy; | 2596 | y -= gy; |
| 2596 | gy += (y / height) * height; | 2597 | gy += (y / height) * height; |
| 2597 | if (part != ON_MODE_LINE && part != ON_HEADER_LINE && part != ON_TAB_LINE) | 2598 | if (part != ON_MODE_LINE && part != ON_HEADER_LINE |
| 2599 | && part != ON_TAB_LINE) | ||
| 2598 | /* See comment above. */ | 2600 | /* See comment above. */ |
| 2599 | height = min (height, | 2601 | height = min (height, |
| 2600 | max (0, WINDOW_BOX_HEIGHT_NO_MODE_LINE (w) - gy)); | 2602 | max (0, WINDOW_BOX_HEIGHT_NO_MODE_LINE (w) - gy)); |
| @@ -12688,7 +12690,9 @@ display_tab_bar (struct window *w) | |||
| 12688 | 12690 | ||
| 12689 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) | 12691 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) |
| 12690 | eassert (!FRAME_WINDOW_P (f)); | 12692 | eassert (!FRAME_WINDOW_P (f)); |
| 12691 | init_iterator (&it, w, -1, -1, f->desired_matrix->rows + (FRAME_MENU_BAR_LINES (f) > 0 ? 1 : 0), TAB_BAR_FACE_ID); | 12693 | init_iterator (&it, w, -1, -1, f->desired_matrix->rows |
| 12694 | + (FRAME_MENU_BAR_LINES (f) > 0 ? 1 : 0), | ||
| 12695 | TAB_BAR_FACE_ID); | ||
| 12692 | it.first_visible_x = 0; | 12696 | it.first_visible_x = 0; |
| 12693 | it.last_visible_x = FRAME_PIXEL_WIDTH (f); | 12697 | it.last_visible_x = FRAME_PIXEL_WIDTH (f); |
| 12694 | #elif defined (HAVE_X_WINDOWS) /* X without toolkit. */ | 12698 | #elif defined (HAVE_X_WINDOWS) /* X without toolkit. */ |
| @@ -12708,7 +12712,8 @@ display_tab_bar (struct window *w) | |||
| 12708 | { | 12712 | { |
| 12709 | /* This is a TTY frame, i.e. character hpos/vpos are used as | 12713 | /* This is a TTY frame, i.e. character hpos/vpos are used as |
| 12710 | pixel x/y. */ | 12714 | pixel x/y. */ |
| 12711 | init_iterator (&it, w, -1, -1, f->desired_matrix->rows + (FRAME_MENU_BAR_LINES (f) > 0 ? 1 : 0), | 12715 | init_iterator (&it, w, -1, -1, f->desired_matrix->rows |
| 12716 | + (FRAME_MENU_BAR_LINES (f) > 0 ? 1 : 0), | ||
| 12712 | TAB_BAR_FACE_ID); | 12717 | TAB_BAR_FACE_ID); |
| 12713 | it.first_visible_x = 0; | 12718 | it.first_visible_x = 0; |
| 12714 | it.last_visible_x = FRAME_COLS (f); | 12719 | it.last_visible_x = FRAME_COLS (f); |
| @@ -17164,7 +17169,8 @@ compute_window_start_on_continuation_line (struct window *w) | |||
| 17164 | 17169 | ||
| 17165 | /* Find the start of the continued line. This should be fast | 17170 | /* Find the start of the continued line. This should be fast |
| 17166 | because find_newline is fast (newline cache). */ | 17171 | because find_newline is fast (newline cache). */ |
| 17167 | row = w->desired_matrix->rows + window_wants_tab_line (w) + window_wants_header_line (w); | 17172 | row = w->desired_matrix->rows + window_wants_tab_line (w) |
| 17173 | + window_wants_header_line (w); | ||
| 17168 | init_iterator (&it, w, CHARPOS (start_pos), BYTEPOS (start_pos), | 17174 | init_iterator (&it, w, CHARPOS (start_pos), BYTEPOS (start_pos), |
| 17169 | row, DEFAULT_FACE_ID); | 17175 | row, DEFAULT_FACE_ID); |
| 17170 | reseat_at_previous_visible_line_start (&it); | 17176 | reseat_at_previous_visible_line_start (&it); |
| @@ -18677,7 +18683,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) | |||
| 18677 | /* This means that the window has a mode line. */ | 18683 | /* This means that the window has a mode line. */ |
| 18678 | && (window_wants_mode_line (w) | 18684 | && (window_wants_mode_line (w) |
| 18679 | || window_wants_header_line (w) | 18685 | || window_wants_header_line (w) |
| 18680 | || window_wants_tab_line (w))) | 18686 | || window_wants_tab_line (w))) |
| 18681 | { | 18687 | { |
| 18682 | 18688 | ||
| 18683 | display_mode_lines (w); | 18689 | display_mode_lines (w); |
| @@ -20822,7 +20828,8 @@ do nothing. */) | |||
| 20822 | EMACS_INT vpos; | 20828 | EMACS_INT vpos; |
| 20823 | 20829 | ||
| 20824 | if (NILP (row)) | 20830 | if (NILP (row)) |
| 20825 | vpos = WINDOWP (sf->tab_bar_window) ? 0 : FRAME_MENU_BAR_LINES (sf) > 0 ? 1 : 0; | 20831 | vpos = WINDOWP (sf->tab_bar_window) ? 0 : |
| 20832 | FRAME_MENU_BAR_LINES (sf) > 0 ? 1 : 0; | ||
| 20826 | else | 20833 | else |
| 20827 | { | 20834 | { |
| 20828 | CHECK_FIXNUM (row); | 20835 | CHECK_FIXNUM (row); |
| @@ -32350,8 +32357,8 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 32350 | row = (area == ON_MODE_LINE | 32357 | row = (area == ON_MODE_LINE |
| 32351 | ? MATRIX_MODE_LINE_ROW (w->current_matrix) | 32358 | ? MATRIX_MODE_LINE_ROW (w->current_matrix) |
| 32352 | : (area == ON_TAB_LINE | 32359 | : (area == ON_TAB_LINE |
| 32353 | ? MATRIX_TAB_LINE_ROW (w->current_matrix) | 32360 | ? MATRIX_TAB_LINE_ROW (w->current_matrix) |
| 32354 | : MATRIX_HEADER_LINE_ROW (w->current_matrix))); | 32361 | : MATRIX_HEADER_LINE_ROW (w->current_matrix))); |
| 32355 | 32362 | ||
| 32356 | /* Find the glyph under the mouse pointer. */ | 32363 | /* Find the glyph under the mouse pointer. */ |
| 32357 | if (row->mode_line_p && row->enabled_p) | 32364 | if (row->mode_line_p && row->enabled_p) |
| @@ -32466,7 +32473,8 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 32466 | 32473 | ||
| 32467 | /* Change the mouse pointer according to what is under X/Y. */ | 32474 | /* Change the mouse pointer according to what is under X/Y. */ |
| 32468 | if (NILP (pointer) | 32475 | if (NILP (pointer) |
| 32469 | && (area == ON_MODE_LINE || area == ON_HEADER_LINE || area == ON_TAB_LINE)) | 32476 | && (area == ON_MODE_LINE || area == ON_HEADER_LINE |
| 32477 | || area == ON_TAB_LINE)) | ||
| 32470 | { | 32478 | { |
| 32471 | Lisp_Object map; | 32479 | Lisp_Object map; |
| 32472 | 32480 | ||
| @@ -32492,7 +32500,8 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 32492 | { | 32500 | { |
| 32493 | mouse_face = Fget_text_property (pos, Qmouse_face, string); | 32501 | mouse_face = Fget_text_property (pos, Qmouse_face, string); |
| 32494 | if (!NILP (Vmouse_highlight) && !NILP (mouse_face) | 32502 | if (!NILP (Vmouse_highlight) && !NILP (mouse_face) |
| 32495 | && ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE) || (area == ON_TAB_LINE)) | 32503 | && ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE) |
| 32504 | || (area == ON_TAB_LINE)) | ||
| 32496 | && glyph) | 32505 | && glyph) |
| 32497 | { | 32506 | { |
| 32498 | Lisp_Object b, e; | 32507 | Lisp_Object b, e; |
| @@ -32564,10 +32573,10 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 32564 | vpos = (area == ON_MODE_LINE | 32573 | vpos = (area == ON_MODE_LINE |
| 32565 | ? (w->current_matrix)->nrows - 1 | 32574 | ? (w->current_matrix)->nrows - 1 |
| 32566 | : (area == ON_TAB_LINE | 32575 | : (area == ON_TAB_LINE |
| 32567 | ? 0 | 32576 | ? 0 |
| 32568 | : (w->current_matrix->tab_line_p | 32577 | : (w->current_matrix->tab_line_p |
| 32569 | ? 1 | 32578 | ? 1 |
| 32570 | : 0))); | 32579 | : 0))); |
| 32571 | 32580 | ||
| 32572 | /* If GLYPH's position is included in the region that is | 32581 | /* If GLYPH's position is included in the region that is |
| 32573 | already drawn in mouse face, we have nothing to do. */ | 32582 | already drawn in mouse face, we have nothing to do. */ |
| @@ -32623,7 +32632,8 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 32623 | 32632 | ||
| 32624 | /* If mouse-face doesn't need to be shown, clear any existing | 32633 | /* If mouse-face doesn't need to be shown, clear any existing |
| 32625 | mouse-face. */ | 32634 | mouse-face. */ |
| 32626 | if ((area == ON_MODE_LINE || area == ON_HEADER_LINE || area == ON_TAB_LINE) && !mouse_face_shown) | 32635 | if ((area == ON_MODE_LINE || area == ON_HEADER_LINE |
| 32636 | || area == ON_TAB_LINE) && !mouse_face_shown) | ||
| 32627 | clear_mouse_face (hlinfo); | 32637 | clear_mouse_face (hlinfo); |
| 32628 | 32638 | ||
| 32629 | define_frame_cursor1 (f, cursor, pointer); | 32639 | define_frame_cursor1 (f, cursor, pointer); |
| @@ -34372,10 +34382,6 @@ vertical margin. */); | |||
| 34372 | doc: /* Relief thickness of tab-bar buttons. */); | 34382 | doc: /* Relief thickness of tab-bar buttons. */); |
| 34373 | tab_bar_button_relief = DEFAULT_TAB_BAR_BUTTON_RELIEF; | 34383 | tab_bar_button_relief = DEFAULT_TAB_BAR_BUTTON_RELIEF; |
| 34374 | 34384 | ||
| 34375 | DEFVAR_INT ("tab-bar-max-label-size", tab_bar_max_label_size, | ||
| 34376 | doc: /* Maximum number of characters a label can have to be shown. */); | ||
| 34377 | tab_bar_max_label_size = DEFAULT_TAB_BAR_LABEL_SIZE; | ||
| 34378 | |||
| 34379 | DEFVAR_LISP ("tool-bar-border", Vtool_bar_border, | 34385 | DEFVAR_LISP ("tool-bar-border", Vtool_bar_border, |
| 34380 | doc: /* Border below tool-bar in pixels. | 34386 | doc: /* Border below tool-bar in pixels. |
| 34381 | If an integer, use it as the height of the border. | 34387 | If an integer, use it as the height of the border. |
diff --git a/src/xfaces.c b/src/xfaces.c index ccf33795071..4e404dc49a9 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -6585,8 +6585,8 @@ syms_of_xfaces (void) | |||
| 6585 | DEFSYM (Qtool_bar, "tool-bar"); | 6585 | DEFSYM (Qtool_bar, "tool-bar"); |
| 6586 | DEFSYM (Qtab_bar, "tab-bar"); | 6586 | DEFSYM (Qtab_bar, "tab-bar"); |
| 6587 | DEFSYM (Qfringe, "fringe"); | 6587 | DEFSYM (Qfringe, "fringe"); |
| 6588 | DEFSYM (Qheader_line, "header-line"); | ||
| 6589 | DEFSYM (Qtab_line, "tab-line"); | 6588 | DEFSYM (Qtab_line, "tab-line"); |
| 6589 | DEFSYM (Qheader_line, "header-line"); | ||
| 6590 | DEFSYM (Qscroll_bar, "scroll-bar"); | 6590 | DEFSYM (Qscroll_bar, "scroll-bar"); |
| 6591 | DEFSYM (Qmenu, "menu"); | 6591 | DEFSYM (Qmenu, "menu"); |
| 6592 | DEFSYM (Qcursor, "cursor"); | 6592 | DEFSYM (Qcursor, "cursor"); |
diff --git a/src/xfns.c b/src/xfns.c index be869fdd244..20e63a26501 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2820,7 +2820,6 @@ xic_set_statusarea (struct frame *f) | |||
| 2820 | area.x = FRAME_PIXEL_WIDTH (f) - area.width - FRAME_INTERNAL_BORDER_WIDTH (f); | 2820 | area.x = FRAME_PIXEL_WIDTH (f) - area.width - FRAME_INTERNAL_BORDER_WIDTH (f); |
| 2821 | area.y = (FRAME_PIXEL_HEIGHT (f) - area.height | 2821 | area.y = (FRAME_PIXEL_HEIGHT (f) - area.height |
| 2822 | - FRAME_MENUBAR_HEIGHT (f) | 2822 | - FRAME_MENUBAR_HEIGHT (f) |
| 2823 | - FRAME_TABBAR_TOP_HEIGHT (f) | ||
| 2824 | - FRAME_TOOLBAR_TOP_HEIGHT (f) | 2823 | - FRAME_TOOLBAR_TOP_HEIGHT (f) |
| 2825 | - FRAME_INTERNAL_BORDER_WIDTH (f)); | 2824 | - FRAME_INTERNAL_BORDER_WIDTH (f)); |
| 2826 | XFree (needed); | 2825 | XFree (needed); |
diff --git a/src/xterm.c b/src/xterm.c index 428d970206e..0b9cbdebd6b 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3223,8 +3223,8 @@ x_draw_image_relief (struct glyph_string *s) | |||
| 3223 | thick = (tab_bar_button_relief < 0 | 3223 | thick = (tab_bar_button_relief < 0 |
| 3224 | ? DEFAULT_TAB_BAR_BUTTON_RELIEF | 3224 | ? DEFAULT_TAB_BAR_BUTTON_RELIEF |
| 3225 | : (tool_bar_button_relief < 0 | 3225 | : (tool_bar_button_relief < 0 |
| 3226 | ? DEFAULT_TOOL_BAR_BUTTON_RELIEF | 3226 | ? DEFAULT_TOOL_BAR_BUTTON_RELIEF |
| 3227 | : min (tool_bar_button_relief, 1000000))); | 3227 | : min (tool_bar_button_relief, 1000000))); |
| 3228 | raised_p = s->hl == DRAW_IMAGE_RAISED; | 3228 | raised_p = s->hl == DRAW_IMAGE_RAISED; |
| 3229 | } | 3229 | } |
| 3230 | else | 3230 | else |
| @@ -10222,7 +10222,7 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset) | |||
| 10222 | false, Qfont); | 10222 | false, Qfont); |
| 10223 | #ifndef USE_X_TOOLKIT | 10223 | #ifndef USE_X_TOOLKIT |
| 10224 | 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) | 10225 | || FRAME_TAB_BAR_HEIGHT (f) != old_tab_bar_height) |
| 10226 | && !f->after_make_frame | 10226 | && !f->after_make_frame |
| 10227 | && (EQ (frame_inhibit_implied_resize, Qt) | 10227 | && (EQ (frame_inhibit_implied_resize, Qt) |
| 10228 | || (CONSP (frame_inhibit_implied_resize) | 10228 | || (CONSP (frame_inhibit_implied_resize) |
| @@ -10232,7 +10232,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset) | |||
| 10232 | /* If the menu/tab bar height changes, try to keep text height | 10232 | /* If the menu/tab bar height changes, try to keep text height |
| 10233 | constant. */ | 10233 | constant. */ |
| 10234 | adjust_frame_size | 10234 | adjust_frame_size |
| 10235 | (f, -1, FRAME_TEXT_HEIGHT (f) + FRAME_MENU_BAR_HEIGHT (f) + FRAME_TAB_BAR_HEIGHT (f) | 10235 | (f, -1, FRAME_TEXT_HEIGHT (f) + FRAME_MENU_BAR_HEIGHT (f) |
| 10236 | + FRAME_TAB_BAR_HEIGHT (f) | ||
| 10236 | - old_menu_bar_height - old_tab_bar_height, 1, false, Qfont); | 10237 | - old_menu_bar_height - old_tab_bar_height, 1, false, Qfont); |
| 10237 | #endif /* USE_X_TOOLKIT */ | 10238 | #endif /* USE_X_TOOLKIT */ |
| 10238 | } | 10239 | } |
| @@ -11168,7 +11169,7 @@ x_check_fullscreen (struct frame *f) | |||
| 11168 | case FULLSCREEN_WIDTH: | 11169 | case FULLSCREEN_WIDTH: |
| 11169 | lval = Qfullwidth; | 11170 | lval = Qfullwidth; |
| 11170 | width = x_display_pixel_width (dpyinfo); | 11171 | width = x_display_pixel_width (dpyinfo); |
| 11171 | height = height + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f); | 11172 | height = height + FRAME_MENUBAR_HEIGHT (f); |
| 11172 | break; | 11173 | break; |
| 11173 | case FULLSCREEN_HEIGHT: | 11174 | case FULLSCREEN_HEIGHT: |
| 11174 | lval = Qfullheight; | 11175 | lval = Qfullheight; |
| @@ -11190,7 +11191,7 @@ x_check_fullscreen (struct frame *f) | |||
| 11190 | x_wait_for_event (f, ConfigureNotify); | 11191 | x_wait_for_event (f, ConfigureNotify); |
| 11191 | else | 11192 | else |
| 11192 | { | 11193 | { |
| 11193 | change_frame_size (f, width, height - FRAME_MENUBAR_HEIGHT (f) - FRAME_TABBAR_HEIGHT (f), | 11194 | change_frame_size (f, width, height - FRAME_MENUBAR_HEIGHT (f), |
| 11194 | false, true, false, true); | 11195 | false, true, false, true); |
| 11195 | x_sync (f); | 11196 | x_sync (f); |
| 11196 | } | 11197 | } |
| @@ -11366,10 +11367,10 @@ x_set_window_size_1 (struct frame *f, bool change_gravity, | |||
| 11366 | { | 11367 | { |
| 11367 | frame_size_history_add | 11368 | frame_size_history_add |
| 11368 | (f, Qx_set_window_size_1, width, height, | 11369 | (f, Qx_set_window_size_1, width, height, |
| 11369 | list2i (old_height, pixelheight + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f))); | 11370 | list2i (old_height, pixelheight + FRAME_MENUBAR_HEIGHT (f))); |
| 11370 | 11371 | ||
| 11371 | XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), | 11372 | XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), |
| 11372 | old_width, pixelheight + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f)); | 11373 | old_width, pixelheight + FRAME_MENUBAR_HEIGHT (f)); |
| 11373 | } | 11374 | } |
| 11374 | else if (EQ (fullscreen, Qfullheight) && height == FRAME_TEXT_HEIGHT (f)) | 11375 | else if (EQ (fullscreen, Qfullheight) && height == FRAME_TEXT_HEIGHT (f)) |
| 11375 | { | 11376 | { |
| @@ -11385,12 +11386,13 @@ x_set_window_size_1 (struct frame *f, bool change_gravity, | |||
| 11385 | { | 11386 | { |
| 11386 | frame_size_history_add | 11387 | frame_size_history_add |
| 11387 | (f, Qx_set_window_size_3, width, height, | 11388 | (f, Qx_set_window_size_3, width, height, |
| 11388 | list3i (pixelwidth + FRAME_TOOLBAR_WIDTH (f) + FRAME_TABBAR_WIDTH (f), | 11389 | list3i (pixelwidth + FRAME_TOOLBAR_WIDTH (f), |
| 11389 | (pixelheight + FRAME_TOOLBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f)), | 11390 | (pixelheight + FRAME_TOOLBAR_HEIGHT (f) |
| 11390 | FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f))); | 11391 | + FRAME_MENUBAR_HEIGHT (f)), |
| 11392 | FRAME_MENUBAR_HEIGHT (f))); | ||
| 11391 | 11393 | ||
| 11392 | XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), | 11394 | XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), |
| 11393 | pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f)); | 11395 | pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f)); |
| 11394 | fullscreen = Qnil; | 11396 | fullscreen = Qnil; |
| 11395 | } | 11397 | } |
| 11396 | 11398 | ||
| @@ -11467,7 +11469,7 @@ x_set_window_size (struct frame *f, bool change_gravity, | |||
| 11467 | #ifdef USE_X_TOOLKIT | 11469 | #ifdef USE_X_TOOLKIT |
| 11468 | /* The menu bar is not part of text lines. The tool bar | 11470 | /* The menu bar is not part of text lines. The tool bar |
| 11469 | is however. */ | 11471 | is however. */ |
| 11470 | pixelh -= FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f); | 11472 | pixelh -= FRAME_MENUBAR_HEIGHT (f); |
| 11471 | #endif | 11473 | #endif |
| 11472 | text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, FRAME_PIXEL_WIDTH (f)); | 11474 | text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, FRAME_PIXEL_WIDTH (f)); |
| 11473 | text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, pixelh); | 11475 | text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, pixelh); |
| @@ -12263,7 +12265,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position) | |||
| 12263 | 12265 | ||
| 12264 | size_hints.flags |= PBaseSize; | 12266 | size_hints.flags |= PBaseSize; |
| 12265 | size_hints.base_width = base_width; | 12267 | size_hints.base_width = base_width; |
| 12266 | size_hints.base_height = base_height + FRAME_MENUBAR_HEIGHT (f) + FRAME_TABBAR_HEIGHT (f); | 12268 | size_hints.base_height = base_height + FRAME_MENUBAR_HEIGHT (f); |
| 12267 | size_hints.min_width = base_width; | 12269 | size_hints.min_width = base_width; |
| 12268 | size_hints.min_height = base_height; | 12270 | size_hints.min_height = base_height; |
| 12269 | } | 12271 | } |
diff --git a/src/xterm.h b/src/xterm.h index 5b4d47d3b62..69af552e078 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -505,16 +505,6 @@ struct x_output | |||
| 505 | int menubar_height; | 505 | int menubar_height; |
| 506 | #endif | 506 | #endif |
| 507 | 507 | ||
| 508 | /* Height of tab bar widget, in pixels. top_height is used if tab bar | ||
| 509 | at top, bottom_height if tab bar is at the bottom. | ||
| 510 | Zero if not using an external tab bar or if tab bar is vertical. */ | ||
| 511 | int tabbar_top_height, tabbar_bottom_height; | ||
| 512 | |||
| 513 | /* Width of tab bar widget, in pixels. left_width is used if tab bar | ||
| 514 | at left, right_width if tab bar is at the right. | ||
| 515 | Zero if not using an external tab bar or if tab bar is horizontal. */ | ||
| 516 | int tabbar_left_width, tabbar_right_width; | ||
| 517 | |||
| 518 | /* Height of tool bar widget, in pixels. top_height is used if tool bar | 508 | /* Height of tool bar widget, in pixels. top_height is used if tool bar |
| 519 | at top, bottom_height if tool bar is at the bottom. | 509 | at top, bottom_height if tool bar is at the bottom. |
| 520 | Zero if not using an external tool bar or if tool bar is vertical. */ | 510 | Zero if not using an external tool bar or if tool bar is vertical. */ |
| @@ -582,11 +572,6 @@ struct x_output | |||
| 582 | GtkWidget *hbox_widget; | 572 | GtkWidget *hbox_widget; |
| 583 | /* The menubar in this frame. */ | 573 | /* The menubar in this frame. */ |
| 584 | GtkWidget *menubar_widget; | 574 | GtkWidget *menubar_widget; |
| 585 | /* The tab bar in this frame */ | ||
| 586 | GtkWidget *tabbar_widget; | ||
| 587 | /* True if tab bar is packed into the hbox widget (i.e. vertical). */ | ||
| 588 | bool_bf tabbar_in_hbox : 1; | ||
| 589 | bool_bf tabbar_is_packed : 1; | ||
| 590 | /* The tool bar in this frame */ | 575 | /* The tool bar in this frame */ |
| 591 | GtkWidget *toolbar_widget; | 576 | GtkWidget *toolbar_widget; |
| 592 | /* True if tool bar is packed into the hbox widget (i.e. vertical). */ | 577 | /* True if tool bar is packed into the hbox widget (i.e. vertical). */ |
| @@ -830,15 +815,6 @@ extern void x_mark_frame_dirty (struct frame *f); | |||
| 830 | 815 | ||
| 831 | #define FRAME_FONT(f) ((f)->output_data.x->font) | 816 | #define FRAME_FONT(f) ((f)->output_data.x->font) |
| 832 | #define FRAME_FONTSET(f) ((f)->output_data.x->fontset) | 817 | #define FRAME_FONTSET(f) ((f)->output_data.x->fontset) |
| 833 | #define FRAME_TABBAR_TOP_HEIGHT(f) ((f)->output_data.x->tabbar_top_height) | ||
| 834 | #define FRAME_TABBAR_BOTTOM_HEIGHT(f) \ | ||
| 835 | ((f)->output_data.x->tabbar_bottom_height) | ||
| 836 | #define FRAME_TABBAR_HEIGHT(f) \ | ||
| 837 | (FRAME_TABBAR_TOP_HEIGHT (f) + FRAME_TABBAR_BOTTOM_HEIGHT (f)) | ||
| 838 | #define FRAME_TABBAR_LEFT_WIDTH(f) ((f)->output_data.x->tabbar_left_width) | ||
| 839 | #define FRAME_TABBAR_RIGHT_WIDTH(f) ((f)->output_data.x->tabbar_right_width) | ||
| 840 | #define FRAME_TABBAR_WIDTH(f) \ | ||
| 841 | (FRAME_TABBAR_LEFT_WIDTH (f) + FRAME_TABBAR_RIGHT_WIDTH (f)) | ||
| 842 | #define FRAME_TOOLBAR_TOP_HEIGHT(f) ((f)->output_data.x->toolbar_top_height) | 818 | #define FRAME_TOOLBAR_TOP_HEIGHT(f) ((f)->output_data.x->toolbar_top_height) |
| 843 | #define FRAME_TOOLBAR_BOTTOM_HEIGHT(f) \ | 819 | #define FRAME_TOOLBAR_BOTTOM_HEIGHT(f) \ |
| 844 | ((f)->output_data.x->toolbar_bottom_height) | 820 | ((f)->output_data.x->toolbar_bottom_height) |