diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 240 |
1 files changed, 119 insertions, 121 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 49c06c7d97d..29f164e34e9 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -428,8 +428,8 @@ DEFUN ("dump-redisplay-history", Fdump_redisplay_history, | |||
| 428 | 428 | ||
| 429 | #else /* GLYPH_DEBUG == 0 */ | 429 | #else /* GLYPH_DEBUG == 0 */ |
| 430 | 430 | ||
| 431 | #define WINDOW_TO_FRAME_VPOS(W, VPOS) ((VPOS) + XFASTINT ((W)->top)) | 431 | #define WINDOW_TO_FRAME_VPOS(W, VPOS) ((VPOS) + WINDOW_TOP_EDGE_LINE (W)) |
| 432 | #define WINDOW_TO_FRAME_HPOS(W, HPOS) ((HPOS) + XFASTINT ((W)->left)) | 432 | #define WINDOW_TO_FRAME_HPOS(W, HPOS) ((HPOS) + WINDOW_LEFT_EDGE_COL (W)) |
| 433 | 433 | ||
| 434 | #endif /* GLYPH_DEBUG == 0 */ | 434 | #endif /* GLYPH_DEBUG == 0 */ |
| 435 | 435 | ||
| @@ -576,7 +576,7 @@ margin_glyphs_to_reserve (w, total_glyphs, margin) | |||
| 576 | 576 | ||
| 577 | if (NUMBERP (margin)) | 577 | if (NUMBERP (margin)) |
| 578 | { | 578 | { |
| 579 | int width = XFASTINT (w->width); | 579 | int width = XFASTINT (w->total_cols); |
| 580 | double d = max (0, XFLOATINT (margin)); | 580 | double d = max (0, XFLOATINT (margin)); |
| 581 | d = min (width / 2 - 1, d); | 581 | d = min (width / 2 - 1, d); |
| 582 | n = (int) ((double) total_glyphs / width * d); | 582 | n = (int) ((double) total_glyphs / width * d); |
| @@ -623,7 +623,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim) | |||
| 623 | int header_line_changed_p = 0; | 623 | int header_line_changed_p = 0; |
| 624 | int header_line_p = 0; | 624 | int header_line_p = 0; |
| 625 | int left = -1, right = -1; | 625 | int left = -1, right = -1; |
| 626 | int window_x, window_y, window_width = -1, window_height; | 626 | int window_width = -1, window_height; |
| 627 | 627 | ||
| 628 | /* See if W had a header line that has disappeared now, or vice versa. */ | 628 | /* See if W had a header line that has disappeared now, or vice versa. */ |
| 629 | if (w) | 629 | if (w) |
| @@ -638,9 +638,9 @@ adjust_glyph_matrix (w, matrix, x, y, dim) | |||
| 638 | the matrix means preventing redisplay. */ | 638 | the matrix means preventing redisplay. */ |
| 639 | if (matrix->pool == NULL) | 639 | if (matrix->pool == NULL) |
| 640 | { | 640 | { |
| 641 | window_box (w, -1, &window_x, &window_y, &window_width, &window_height); | 641 | window_box (w, -1, 0, 0, &window_width, &window_height); |
| 642 | left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_width); | 642 | left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols); |
| 643 | right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_width); | 643 | right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols); |
| 644 | xassert (left >= 0 && right >= 0); | 644 | xassert (left >= 0 && right >= 0); |
| 645 | marginal_areas_changed_p = (left != matrix->left_margin_glyphs | 645 | marginal_areas_changed_p = (left != matrix->left_margin_glyphs |
| 646 | || right != matrix->right_margin_glyphs); | 646 | || right != matrix->right_margin_glyphs); |
| @@ -648,8 +648,8 @@ adjust_glyph_matrix (w, matrix, x, y, dim) | |||
| 648 | if (!marginal_areas_changed_p | 648 | if (!marginal_areas_changed_p |
| 649 | && !fonts_changed_p | 649 | && !fonts_changed_p |
| 650 | && !header_line_changed_p | 650 | && !header_line_changed_p |
| 651 | && matrix->window_left_x == XFASTINT (w->left) | 651 | && matrix->window_left_col == WINDOW_LEFT_EDGE_COL (w) |
| 652 | && matrix->window_top_y == XFASTINT (w->top) | 652 | && matrix->window_top_line == WINDOW_TOP_EDGE_LINE (w) |
| 653 | && matrix->window_height == window_height | 653 | && matrix->window_height == window_height |
| 654 | && matrix->window_vscroll == w->vscroll | 654 | && matrix->window_vscroll == w->vscroll |
| 655 | && matrix->window_width == window_width) | 655 | && matrix->window_width == window_width) |
| @@ -679,9 +679,9 @@ adjust_glyph_matrix (w, matrix, x, y, dim) | |||
| 679 | if (w) | 679 | if (w) |
| 680 | { | 680 | { |
| 681 | left = margin_glyphs_to_reserve (w, dim.width, | 681 | left = margin_glyphs_to_reserve (w, dim.width, |
| 682 | w->left_margin_width); | 682 | w->left_margin_cols); |
| 683 | right = margin_glyphs_to_reserve (w, dim.width, | 683 | right = margin_glyphs_to_reserve (w, dim.width, |
| 684 | w->right_margin_width); | 684 | w->right_margin_cols); |
| 685 | } | 685 | } |
| 686 | else | 686 | else |
| 687 | left = right = 0; | 687 | left = right = 0; |
| @@ -790,8 +790,8 @@ adjust_glyph_matrix (w, matrix, x, y, dim) | |||
| 790 | && !header_line_changed_p | 790 | && !header_line_changed_p |
| 791 | && new_rows == 0 | 791 | && new_rows == 0 |
| 792 | && dim.width == matrix->matrix_w | 792 | && dim.width == matrix->matrix_w |
| 793 | && matrix->window_left_x == XFASTINT (w->left) | 793 | && matrix->window_left_col == WINDOW_LEFT_EDGE_COL (w) |
| 794 | && matrix->window_top_y == XFASTINT (w->top) | 794 | && matrix->window_top_line == WINDOW_TOP_EDGE_LINE (w) |
| 795 | && matrix->window_width == window_width) | 795 | && matrix->window_width == window_width) |
| 796 | { | 796 | { |
| 797 | /* Find the last row in the window. */ | 797 | /* Find the last row in the window. */ |
| @@ -839,8 +839,8 @@ adjust_glyph_matrix (w, matrix, x, y, dim) | |||
| 839 | was last adjusted. This is used to optimize redisplay above. */ | 839 | was last adjusted. This is used to optimize redisplay above. */ |
| 840 | if (w) | 840 | if (w) |
| 841 | { | 841 | { |
| 842 | matrix->window_left_x = XFASTINT (w->left); | 842 | matrix->window_left_col = WINDOW_LEFT_EDGE_COL (w); |
| 843 | matrix->window_top_y = XFASTINT (w->top); | 843 | matrix->window_top_line = WINDOW_TOP_EDGE_LINE (w); |
| 844 | matrix->window_height = window_height; | 844 | matrix->window_height = window_height; |
| 845 | matrix->window_width = window_width; | 845 | matrix->window_width = window_width; |
| 846 | matrix->window_vscroll = w->vscroll; | 846 | matrix->window_vscroll = w->vscroll; |
| @@ -983,8 +983,8 @@ shift_glyph_matrix (w, matrix, start, end, dy) | |||
| 983 | xassert (start >= 0 && start < matrix->nrows); | 983 | xassert (start >= 0 && start < matrix->nrows); |
| 984 | xassert (end >= 0 && end <= matrix->nrows); | 984 | xassert (end >= 0 && end <= matrix->nrows); |
| 985 | 985 | ||
| 986 | min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); | 986 | min_y = WINDOW_HEADER_LINE_HEIGHT (w); |
| 987 | max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w); | 987 | max_y = WINDOW_BOX_HEIGHT_NO_MODE_LINE (w); |
| 988 | 988 | ||
| 989 | for (; start < end; ++start) | 989 | for (; start < end; ++start) |
| 990 | { | 990 | { |
| @@ -1143,13 +1143,13 @@ blank_row (w, row, y) | |||
| 1143 | { | 1143 | { |
| 1144 | int min_y, max_y; | 1144 | int min_y, max_y; |
| 1145 | 1145 | ||
| 1146 | min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); | 1146 | min_y = WINDOW_HEADER_LINE_HEIGHT (w); |
| 1147 | max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w); | 1147 | max_y = WINDOW_BOX_HEIGHT_NO_MODE_LINE (w); |
| 1148 | 1148 | ||
| 1149 | clear_glyph_row (row); | 1149 | clear_glyph_row (row); |
| 1150 | row->y = y; | 1150 | row->y = y; |
| 1151 | row->ascent = row->phys_ascent = 0; | 1151 | row->ascent = row->phys_ascent = 0; |
| 1152 | row->height = row->phys_height = CANON_Y_UNIT (XFRAME (w->frame)); | 1152 | row->height = row->phys_height = FRAME_LINE_HEIGHT (XFRAME (w->frame)); |
| 1153 | row->visible_height = row->height; | 1153 | row->visible_height = row->height; |
| 1154 | 1154 | ||
| 1155 | if (row->y < min_y) | 1155 | if (row->y < min_y) |
| @@ -1905,10 +1905,10 @@ allocate_matrices_for_frame_redisplay (window, x, y, dim_only_p, | |||
| 1905 | || dim.width != w->desired_matrix->matrix_w | 1905 | || dim.width != w->desired_matrix->matrix_w |
| 1906 | || dim.height != w->desired_matrix->matrix_h | 1906 | || dim.height != w->desired_matrix->matrix_h |
| 1907 | || (margin_glyphs_to_reserve (w, dim.width, | 1907 | || (margin_glyphs_to_reserve (w, dim.width, |
| 1908 | w->right_margin_width) | 1908 | w->right_margin_cols) |
| 1909 | != w->desired_matrix->left_margin_glyphs) | 1909 | != w->desired_matrix->left_margin_glyphs) |
| 1910 | || (margin_glyphs_to_reserve (w, dim.width, | 1910 | || (margin_glyphs_to_reserve (w, dim.width, |
| 1911 | w->left_margin_width) | 1911 | w->left_margin_cols) |
| 1912 | != w->desired_matrix->right_margin_glyphs)) | 1912 | != w->desired_matrix->right_margin_glyphs)) |
| 1913 | *window_change_flags |= CHANGED_LEAF_MATRIX; | 1913 | *window_change_flags |= CHANGED_LEAF_MATRIX; |
| 1914 | 1914 | ||
| @@ -1985,7 +1985,7 @@ required_matrix_height (w) | |||
| 1985 | } | 1985 | } |
| 1986 | #endif /* HAVE_WINDOW_SYSTEM */ | 1986 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 1987 | 1987 | ||
| 1988 | return XINT (w->height); | 1988 | return WINDOW_TOTAL_LINES (w); |
| 1989 | } | 1989 | } |
| 1990 | 1990 | ||
| 1991 | 1991 | ||
| @@ -2000,7 +2000,7 @@ required_matrix_width (w) | |||
| 2000 | if (FRAME_WINDOW_P (f)) | 2000 | if (FRAME_WINDOW_P (f)) |
| 2001 | { | 2001 | { |
| 2002 | int ch_width = FRAME_SMALLEST_CHAR_WIDTH (f); | 2002 | int ch_width = FRAME_SMALLEST_CHAR_WIDTH (f); |
| 2003 | int window_pixel_width = XFLOATINT (w->width) * CANON_X_UNIT (f); | 2003 | int window_pixel_width = WINDOW_TOTAL_WIDTH (w); |
| 2004 | 2004 | ||
| 2005 | /* Compute number of glyphs needed in a glyph row. */ | 2005 | /* Compute number of glyphs needed in a glyph row. */ |
| 2006 | return (((window_pixel_width + ch_width - 1) | 2006 | return (((window_pixel_width + ch_width - 1) |
| @@ -2013,7 +2013,7 @@ required_matrix_width (w) | |||
| 2013 | } | 2013 | } |
| 2014 | #endif /* HAVE_WINDOW_SYSTEM */ | 2014 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 2015 | 2015 | ||
| 2016 | return XINT (w->width); | 2016 | return XINT (w->total_cols); |
| 2017 | } | 2017 | } |
| 2018 | 2018 | ||
| 2019 | 2019 | ||
| @@ -2098,18 +2098,18 @@ adjust_frame_glyphs_initially () | |||
| 2098 | struct frame *sf = SELECTED_FRAME (); | 2098 | struct frame *sf = SELECTED_FRAME (); |
| 2099 | struct window *root = XWINDOW (sf->root_window); | 2099 | struct window *root = XWINDOW (sf->root_window); |
| 2100 | struct window *mini = XWINDOW (root->next); | 2100 | struct window *mini = XWINDOW (root->next); |
| 2101 | int frame_height = FRAME_HEIGHT (sf); | 2101 | int frame_lines = FRAME_LINES (sf); |
| 2102 | int frame_width = FRAME_WIDTH (sf); | 2102 | int frame_cols = FRAME_COLS (sf); |
| 2103 | int top_margin = FRAME_TOP_MARGIN (sf); | 2103 | int top_margin = FRAME_TOP_MARGIN (sf); |
| 2104 | 2104 | ||
| 2105 | /* Do it for the root window. */ | 2105 | /* Do it for the root window. */ |
| 2106 | XSETFASTINT (root->top, top_margin); | 2106 | XSETFASTINT (root->top_line, top_margin); |
| 2107 | XSETFASTINT (root->width, frame_width); | 2107 | XSETFASTINT (root->total_cols, frame_cols); |
| 2108 | set_window_height (sf->root_window, frame_height - 1 - top_margin, 0); | 2108 | set_window_height (sf->root_window, frame_lines - 1 - top_margin, 0); |
| 2109 | 2109 | ||
| 2110 | /* Do it for the mini-buffer window. */ | 2110 | /* Do it for the mini-buffer window. */ |
| 2111 | XSETFASTINT (mini->top, frame_height - 1); | 2111 | XSETFASTINT (mini->top_line, frame_lines - 1); |
| 2112 | XSETFASTINT (mini->width, frame_width); | 2112 | XSETFASTINT (mini->total_cols, frame_cols); |
| 2113 | set_window_height (root->next, 1, 0); | 2113 | set_window_height (root->next, 1, 0); |
| 2114 | 2114 | ||
| 2115 | adjust_frame_glyphs (sf); | 2115 | adjust_frame_glyphs (sf); |
| @@ -2161,13 +2161,13 @@ fake_current_matrices (window) | |||
| 2161 | struct glyph_matrix *m = w->current_matrix; | 2161 | struct glyph_matrix *m = w->current_matrix; |
| 2162 | struct glyph_matrix *fm = f->current_matrix; | 2162 | struct glyph_matrix *fm = f->current_matrix; |
| 2163 | 2163 | ||
| 2164 | xassert (m->matrix_h == XFASTINT (w->height)); | 2164 | xassert (m->matrix_h == WINDOW_TOTAL_LINES (w)); |
| 2165 | xassert (m->matrix_w == XFASTINT (w->width)); | 2165 | xassert (m->matrix_w == WINDOW_TOTAL_COLS (w)); |
| 2166 | 2166 | ||
| 2167 | for (i = 0; i < m->matrix_h; ++i) | 2167 | for (i = 0; i < m->matrix_h; ++i) |
| 2168 | { | 2168 | { |
| 2169 | struct glyph_row *r = m->rows + i; | 2169 | struct glyph_row *r = m->rows + i; |
| 2170 | struct glyph_row *fr = fm->rows + i + XFASTINT (w->top); | 2170 | struct glyph_row *fr = fm->rows + i + WINDOW_TOP_EDGE_LINE (w); |
| 2171 | 2171 | ||
| 2172 | xassert (r->glyphs[TEXT_AREA] >= fr->glyphs[TEXT_AREA] | 2172 | xassert (r->glyphs[TEXT_AREA] >= fr->glyphs[TEXT_AREA] |
| 2173 | && r->glyphs[LAST_AREA] <= fr->glyphs[LAST_AREA]); | 2173 | && r->glyphs[LAST_AREA] <= fr->glyphs[LAST_AREA]); |
| @@ -2313,8 +2313,8 @@ adjust_frame_glyphs_for_frame_redisplay (f) | |||
| 2313 | /* Size of frame matrices must equal size of frame. Note | 2313 | /* Size of frame matrices must equal size of frame. Note |
| 2314 | that we are called for X frames with window widths NOT equal | 2314 | that we are called for X frames with window widths NOT equal |
| 2315 | to the frame width (from CHANGE_FRAME_SIZE_1). */ | 2315 | to the frame width (from CHANGE_FRAME_SIZE_1). */ |
| 2316 | xassert (matrix_dim.width == FRAME_WIDTH (f) | 2316 | xassert (matrix_dim.width == FRAME_COLS (f) |
| 2317 | && matrix_dim.height == FRAME_HEIGHT (f)); | 2317 | && matrix_dim.height == FRAME_LINES (f)); |
| 2318 | 2318 | ||
| 2319 | /* Pointers to glyph memory in glyph rows are exchanged during | 2319 | /* Pointers to glyph memory in glyph rows are exchanged during |
| 2320 | the update phase of redisplay, which means in general that a | 2320 | the update phase of redisplay, which means in general that a |
| @@ -2386,10 +2386,10 @@ adjust_frame_glyphs_for_window_redisplay (f) | |||
| 2386 | 2386 | ||
| 2387 | /* Set window dimensions to frame dimensions and allocate or | 2387 | /* Set window dimensions to frame dimensions and allocate or |
| 2388 | adjust glyph matrices of W. */ | 2388 | adjust glyph matrices of W. */ |
| 2389 | XSETFASTINT (w->top, 0); | 2389 | XSETFASTINT (w->top_line, 0); |
| 2390 | XSETFASTINT (w->left, 0); | 2390 | XSETFASTINT (w->left_col, 0); |
| 2391 | XSETFASTINT (w->height, FRAME_MENU_BAR_LINES (f)); | 2391 | XSETFASTINT (w->total_lines, FRAME_MENU_BAR_LINES (f)); |
| 2392 | XSETFASTINT (w->width, FRAME_WINDOW_WIDTH (f)); | 2392 | XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); |
| 2393 | allocate_matrices_for_window_redisplay (w); | 2393 | allocate_matrices_for_window_redisplay (w); |
| 2394 | } | 2394 | } |
| 2395 | #endif /* not USE_X_TOOLKIT */ | 2395 | #endif /* not USE_X_TOOLKIT */ |
| @@ -2407,10 +2407,10 @@ adjust_frame_glyphs_for_window_redisplay (f) | |||
| 2407 | else | 2407 | else |
| 2408 | w = XWINDOW (f->tool_bar_window); | 2408 | w = XWINDOW (f->tool_bar_window); |
| 2409 | 2409 | ||
| 2410 | XSETFASTINT (w->top, FRAME_MENU_BAR_LINES (f)); | 2410 | XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f)); |
| 2411 | XSETFASTINT (w->left, 0); | 2411 | XSETFASTINT (w->left_col, 0); |
| 2412 | XSETFASTINT (w->height, FRAME_TOOL_BAR_LINES (f)); | 2412 | XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f)); |
| 2413 | XSETFASTINT (w->width, FRAME_WINDOW_WIDTH (f)); | 2413 | XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); |
| 2414 | allocate_matrices_for_window_redisplay (w); | 2414 | allocate_matrices_for_window_redisplay (w); |
| 2415 | #endif | 2415 | #endif |
| 2416 | } | 2416 | } |
| @@ -3022,14 +3022,14 @@ sync_window_with_frame_matrix_rows (w) | |||
| 3022 | xassert (NILP (w->hchild) && NILP (w->vchild)); | 3022 | xassert (NILP (w->hchild) && NILP (w->vchild)); |
| 3023 | xassert (!FRAME_WINDOW_P (f)); | 3023 | xassert (!FRAME_WINDOW_P (f)); |
| 3024 | 3024 | ||
| 3025 | left = margin_glyphs_to_reserve (w, 1, w->left_margin_width); | 3025 | left = margin_glyphs_to_reserve (w, 1, w->left_margin_cols); |
| 3026 | right = margin_glyphs_to_reserve (w, 1, w->right_margin_width); | 3026 | right = margin_glyphs_to_reserve (w, 1, w->right_margin_cols); |
| 3027 | x = w->current_matrix->matrix_x; | 3027 | x = w->current_matrix->matrix_x; |
| 3028 | width = w->current_matrix->matrix_w; | 3028 | width = w->current_matrix->matrix_w; |
| 3029 | 3029 | ||
| 3030 | window_row = w->current_matrix->rows; | 3030 | window_row = w->current_matrix->rows; |
| 3031 | window_row_end = window_row + w->current_matrix->nrows; | 3031 | window_row_end = window_row + w->current_matrix->nrows; |
| 3032 | frame_row = f->current_matrix->rows + XFASTINT (w->top); | 3032 | frame_row = f->current_matrix->rows + WINDOW_TOP_EDGE_LINE (w); |
| 3033 | 3033 | ||
| 3034 | for (; window_row < window_row_end; ++window_row, ++frame_row) | 3034 | for (; window_row < window_row_end; ++window_row, ++frame_row) |
| 3035 | { | 3035 | { |
| @@ -3061,8 +3061,8 @@ frame_row_to_window (w, row) | |||
| 3061 | found = frame_row_to_window (XWINDOW (w->hchild), row); | 3061 | found = frame_row_to_window (XWINDOW (w->hchild), row); |
| 3062 | else if (!NILP (w->vchild)) | 3062 | else if (!NILP (w->vchild)) |
| 3063 | found = frame_row_to_window (XWINDOW (w->vchild), row); | 3063 | found = frame_row_to_window (XWINDOW (w->vchild), row); |
| 3064 | else if (row >= XFASTINT (w->top) | 3064 | else if (row >= WINDOW_TOP_EDGE_LINE (w) |
| 3065 | && row < XFASTINT (w->top) + XFASTINT (w->height)) | 3065 | && row < WINDOW_BOTTOM_EDGE_LINE (w)) |
| 3066 | found = w; | 3066 | found = w; |
| 3067 | 3067 | ||
| 3068 | w = NILP (w->next) ? 0 : XWINDOW (w->next); | 3068 | w = NILP (w->next) ? 0 : XWINDOW (w->next); |
| @@ -3267,8 +3267,8 @@ window_to_frame_vpos (w, vpos) | |||
| 3267 | 3267 | ||
| 3268 | xassert (!FRAME_WINDOW_P (f)); | 3268 | xassert (!FRAME_WINDOW_P (f)); |
| 3269 | xassert (vpos >= 0 && vpos <= w->desired_matrix->nrows); | 3269 | xassert (vpos >= 0 && vpos <= w->desired_matrix->nrows); |
| 3270 | vpos += XFASTINT (w->top); | 3270 | vpos += WINDOW_TOP_EDGE_LINE (w); |
| 3271 | xassert (vpos >= 0 && vpos <= FRAME_HEIGHT (f)); | 3271 | xassert (vpos >= 0 && vpos <= FRAME_LINES (f)); |
| 3272 | return vpos; | 3272 | return vpos; |
| 3273 | } | 3273 | } |
| 3274 | 3274 | ||
| @@ -3284,7 +3284,7 @@ window_to_frame_hpos (w, hpos) | |||
| 3284 | struct frame *f = XFRAME (w->frame); | 3284 | struct frame *f = XFRAME (w->frame); |
| 3285 | 3285 | ||
| 3286 | xassert (!FRAME_WINDOW_P (f)); | 3286 | xassert (!FRAME_WINDOW_P (f)); |
| 3287 | hpos += XFASTINT (w->left); | 3287 | hpos += WINDOW_LEFT_EDGE_COL (w); |
| 3288 | return hpos; | 3288 | return hpos; |
| 3289 | } | 3289 | } |
| 3290 | 3290 | ||
| @@ -3644,8 +3644,8 @@ direct_output_for_insert (g) | |||
| 3644 | { | 3644 | { |
| 3645 | int x, y; | 3645 | int x, y; |
| 3646 | x = (WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos) | 3646 | x = (WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos) |
| 3647 | + (INTEGERP (w->left_margin_width) | 3647 | + (INTEGERP (w->left_margin_cols) |
| 3648 | ? XFASTINT (w->left_margin_width) | 3648 | ? XFASTINT (w->left_margin_cols) |
| 3649 | : 0)); | 3649 | : 0)); |
| 3650 | y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); | 3650 | y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); |
| 3651 | cursor_to (y, x); | 3651 | cursor_to (y, x); |
| @@ -3739,8 +3739,8 @@ direct_output_forward_char (n) | |||
| 3739 | { | 3739 | { |
| 3740 | int x, y; | 3740 | int x, y; |
| 3741 | x = (WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos) | 3741 | x = (WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos) |
| 3742 | + (INTEGERP (w->left_margin_width) | 3742 | + (INTEGERP (w->left_margin_cols) |
| 3743 | ? XFASTINT (w->left_margin_width) | 3743 | ? XFASTINT (w->left_margin_cols) |
| 3744 | : 0)); | 3744 | : 0)); |
| 3745 | y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); | 3745 | y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); |
| 3746 | cursor_to (y, x); | 3746 | cursor_to (y, x); |
| @@ -4480,7 +4480,7 @@ update_window_line (w, vpos, mouse_face_overwritten_p) | |||
| 4480 | 4480 | ||
| 4481 | /* Update display of the left margin area, if there is one. */ | 4481 | /* Update display of the left margin area, if there is one. */ |
| 4482 | if (!desired_row->full_width_p | 4482 | if (!desired_row->full_width_p |
| 4483 | && !NILP (w->left_margin_width)) | 4483 | && !NILP (w->left_margin_cols)) |
| 4484 | { | 4484 | { |
| 4485 | changed_p = 1; | 4485 | changed_p = 1; |
| 4486 | update_marginal_area (w, LEFT_MARGIN_AREA, vpos); | 4486 | update_marginal_area (w, LEFT_MARGIN_AREA, vpos); |
| @@ -4496,7 +4496,7 @@ update_window_line (w, vpos, mouse_face_overwritten_p) | |||
| 4496 | 4496 | ||
| 4497 | /* Update display of the right margin area, if there is one. */ | 4497 | /* Update display of the right margin area, if there is one. */ |
| 4498 | if (!desired_row->full_width_p | 4498 | if (!desired_row->full_width_p |
| 4499 | && !NILP (w->right_margin_width)) | 4499 | && !NILP (w->right_margin_cols)) |
| 4500 | { | 4500 | { |
| 4501 | changed_p = 1; | 4501 | changed_p = 1; |
| 4502 | update_marginal_area (w, RIGHT_MARGIN_AREA, vpos); | 4502 | update_marginal_area (w, RIGHT_MARGIN_AREA, vpos); |
| @@ -5126,7 +5126,7 @@ update_frame_1 (f, force_p, inhibit_id_p) | |||
| 5126 | } | 5126 | } |
| 5127 | } | 5127 | } |
| 5128 | 5128 | ||
| 5129 | pause = (i < FRAME_HEIGHT (f) - 1) ? i : 0; | 5129 | pause = (i < FRAME_LINES (f) - 1) ? i : 0; |
| 5130 | 5130 | ||
| 5131 | /* Now just clean up termcap drivers and set cursor, etc. */ | 5131 | /* Now just clean up termcap drivers and set cursor, etc. */ |
| 5132 | if (!pause) | 5132 | if (!pause) |
| @@ -5143,7 +5143,7 @@ update_frame_1 (f, force_p, inhibit_id_p) | |||
| 5143 | && FRAME_HAS_MINIBUF_P (f) | 5143 | && FRAME_HAS_MINIBUF_P (f) |
| 5144 | && EQ (FRAME_MINIBUF_WINDOW (f), echo_area_window)) | 5144 | && EQ (FRAME_MINIBUF_WINDOW (f), echo_area_window)) |
| 5145 | { | 5145 | { |
| 5146 | int top = XINT (XWINDOW (FRAME_MINIBUF_WINDOW (f))->top); | 5146 | int top = WINDOW_TOP_EDGE_LINE (XWINDOW (FRAME_MINIBUF_WINDOW (f))); |
| 5147 | int row, col; | 5147 | int row, col; |
| 5148 | 5148 | ||
| 5149 | if (cursor_in_echo_area < 0) | 5149 | if (cursor_in_echo_area < 0) |
| @@ -5159,7 +5159,7 @@ update_frame_1 (f, force_p, inhibit_id_p) | |||
| 5159 | cursor at the end of the prompt. If the mini-buffer | 5159 | cursor at the end of the prompt. If the mini-buffer |
| 5160 | is several lines high, find the last line that has | 5160 | is several lines high, find the last line that has |
| 5161 | any text on it. */ | 5161 | any text on it. */ |
| 5162 | row = FRAME_HEIGHT (f); | 5162 | row = FRAME_LINES (f); |
| 5163 | do | 5163 | do |
| 5164 | { | 5164 | { |
| 5165 | --row; | 5165 | --row; |
| @@ -5187,9 +5187,9 @@ update_frame_1 (f, force_p, inhibit_id_p) | |||
| 5187 | if (col >= FRAME_CURSOR_X_LIMIT (f)) | 5187 | if (col >= FRAME_CURSOR_X_LIMIT (f)) |
| 5188 | { | 5188 | { |
| 5189 | /* If we have another row, advance cursor into it. */ | 5189 | /* If we have another row, advance cursor into it. */ |
| 5190 | if (row < FRAME_HEIGHT (f) - 1) | 5190 | if (row < FRAME_LINES (f) - 1) |
| 5191 | { | 5191 | { |
| 5192 | col = FRAME_LEFT_SCROLL_BAR_WIDTH (f); | 5192 | col = FRAME_LEFT_SCROLL_BAR_COLS (f); |
| 5193 | row++; | 5193 | row++; |
| 5194 | } | 5194 | } |
| 5195 | /* Otherwise move it back in range. */ | 5195 | /* Otherwise move it back in range. */ |
| @@ -5211,15 +5211,15 @@ update_frame_1 (f, force_p, inhibit_id_p) | |||
| 5211 | with the cursor in the lower half of it. The window | 5211 | with the cursor in the lower half of it. The window |
| 5212 | is split, and a message causes a redisplay before | 5212 | is split, and a message causes a redisplay before |
| 5213 | a new cursor position has been computed. */ | 5213 | a new cursor position has been computed. */ |
| 5214 | && w->cursor.vpos < XFASTINT (w->height)) | 5214 | && w->cursor.vpos < WINDOW_TOTAL_LINES (w)) |
| 5215 | { | 5215 | { |
| 5216 | int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos); | 5216 | int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos); |
| 5217 | int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); | 5217 | int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); |
| 5218 | 5218 | ||
| 5219 | if (INTEGERP (w->left_margin_width)) | 5219 | if (INTEGERP (w->left_margin_cols)) |
| 5220 | x += XFASTINT (w->left_margin_width); | 5220 | x += XFASTINT (w->left_margin_cols); |
| 5221 | 5221 | ||
| 5222 | /* x = max (min (x, FRAME_WINDOW_WIDTH (f) - 1), 0); */ | 5222 | /* x = max (min (x, FRAME_TOTAL_COLS (f) - 1), 0); */ |
| 5223 | cursor_to (y, x); | 5223 | cursor_to (y, x); |
| 5224 | } | 5224 | } |
| 5225 | } | 5225 | } |
| @@ -5241,12 +5241,12 @@ scrolling (frame) | |||
| 5241 | int unchanged_at_top, unchanged_at_bottom; | 5241 | int unchanged_at_top, unchanged_at_bottom; |
| 5242 | int window_size; | 5242 | int window_size; |
| 5243 | int changed_lines; | 5243 | int changed_lines; |
| 5244 | int *old_hash = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); | 5244 | int *old_hash = (int *) alloca (FRAME_LINES (frame) * sizeof (int)); |
| 5245 | int *new_hash = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); | 5245 | int *new_hash = (int *) alloca (FRAME_LINES (frame) * sizeof (int)); |
| 5246 | int *draw_cost = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); | 5246 | int *draw_cost = (int *) alloca (FRAME_LINES (frame) * sizeof (int)); |
| 5247 | int *old_draw_cost = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); | 5247 | int *old_draw_cost = (int *) alloca (FRAME_LINES (frame) * sizeof (int)); |
| 5248 | register int i; | 5248 | register int i; |
| 5249 | int free_at_end_vpos = FRAME_HEIGHT (frame); | 5249 | int free_at_end_vpos = FRAME_LINES (frame); |
| 5250 | struct glyph_matrix *current_matrix = frame->current_matrix; | 5250 | struct glyph_matrix *current_matrix = frame->current_matrix; |
| 5251 | struct glyph_matrix *desired_matrix = frame->desired_matrix; | 5251 | struct glyph_matrix *desired_matrix = frame->desired_matrix; |
| 5252 | 5252 | ||
| @@ -5258,8 +5258,8 @@ scrolling (frame) | |||
| 5258 | number of unchanged lines at the end. */ | 5258 | number of unchanged lines at the end. */ |
| 5259 | changed_lines = 0; | 5259 | changed_lines = 0; |
| 5260 | unchanged_at_top = 0; | 5260 | unchanged_at_top = 0; |
| 5261 | unchanged_at_bottom = FRAME_HEIGHT (frame); | 5261 | unchanged_at_bottom = FRAME_LINES (frame); |
| 5262 | for (i = 0; i < FRAME_HEIGHT (frame); i++) | 5262 | for (i = 0; i < FRAME_LINES (frame); i++) |
| 5263 | { | 5263 | { |
| 5264 | /* Give up on this scrolling if some old lines are not enabled. */ | 5264 | /* Give up on this scrolling if some old lines are not enabled. */ |
| 5265 | if (!MATRIX_ROW_ENABLED_P (current_matrix, i)) | 5265 | if (!MATRIX_ROW_ENABLED_P (current_matrix, i)) |
| @@ -5281,7 +5281,7 @@ scrolling (frame) | |||
| 5281 | if (old_hash[i] != new_hash[i]) | 5281 | if (old_hash[i] != new_hash[i]) |
| 5282 | { | 5282 | { |
| 5283 | changed_lines++; | 5283 | changed_lines++; |
| 5284 | unchanged_at_bottom = FRAME_HEIGHT (frame) - i - 1; | 5284 | unchanged_at_bottom = FRAME_LINES (frame) - i - 1; |
| 5285 | } | 5285 | } |
| 5286 | else if (i == unchanged_at_top) | 5286 | else if (i == unchanged_at_top) |
| 5287 | unchanged_at_top++; | 5287 | unchanged_at_top++; |
| @@ -5290,10 +5290,10 @@ scrolling (frame) | |||
| 5290 | 5290 | ||
| 5291 | /* If changed lines are few, don't allow preemption, don't scroll. */ | 5291 | /* If changed lines are few, don't allow preemption, don't scroll. */ |
| 5292 | if ((!scroll_region_ok && changed_lines < baud_rate / 2400) | 5292 | if ((!scroll_region_ok && changed_lines < baud_rate / 2400) |
| 5293 | || unchanged_at_bottom == FRAME_HEIGHT (frame)) | 5293 | || unchanged_at_bottom == FRAME_LINES (frame)) |
| 5294 | return 1; | 5294 | return 1; |
| 5295 | 5295 | ||
| 5296 | window_size = (FRAME_HEIGHT (frame) - unchanged_at_top | 5296 | window_size = (FRAME_LINES (frame) - unchanged_at_top |
| 5297 | - unchanged_at_bottom); | 5297 | - unchanged_at_bottom); |
| 5298 | 5298 | ||
| 5299 | if (scroll_region_ok) | 5299 | if (scroll_region_ok) |
| @@ -5306,7 +5306,7 @@ scrolling (frame) | |||
| 5306 | if (!scroll_region_ok && window_size >= 18 && baud_rate > 2400 | 5306 | if (!scroll_region_ok && window_size >= 18 && baud_rate > 2400 |
| 5307 | && (window_size >= | 5307 | && (window_size >= |
| 5308 | 10 * scrolling_max_lines_saved (unchanged_at_top, | 5308 | 10 * scrolling_max_lines_saved (unchanged_at_top, |
| 5309 | FRAME_HEIGHT (frame) - unchanged_at_bottom, | 5309 | FRAME_LINES (frame) - unchanged_at_bottom, |
| 5310 | old_hash, new_hash, draw_cost))) | 5310 | old_hash, new_hash, draw_cost))) |
| 5311 | return 0; | 5311 | return 0; |
| 5312 | 5312 | ||
| @@ -5365,7 +5365,7 @@ count_match (str1, end1, str2, end2) | |||
| 5365 | /* Char insertion/deletion cost vector, from term.c */ | 5365 | /* Char insertion/deletion cost vector, from term.c */ |
| 5366 | 5366 | ||
| 5367 | extern int *char_ins_del_vector; | 5367 | extern int *char_ins_del_vector; |
| 5368 | #define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_WINDOW_WIDTH((f))]) | 5368 | #define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_TOTAL_COLS((f))]) |
| 5369 | 5369 | ||
| 5370 | 5370 | ||
| 5371 | /* Perform a frame-based update on line VPOS in frame FRAME. */ | 5371 | /* Perform a frame-based update on line VPOS in frame FRAME. */ |
| @@ -5441,10 +5441,10 @@ update_frame_line (f, vpos) | |||
| 5441 | /* Don't call clear_end_of_line if we already wrote the whole | 5441 | /* Don't call clear_end_of_line if we already wrote the whole |
| 5442 | line. The cursor will not be at the right margin in that | 5442 | line. The cursor will not be at the right margin in that |
| 5443 | case but in the line below. */ | 5443 | case but in the line below. */ |
| 5444 | if (nlen < FRAME_WINDOW_WIDTH (f)) | 5444 | if (nlen < FRAME_TOTAL_COLS (f)) |
| 5445 | { | 5445 | { |
| 5446 | cursor_to (vpos, nlen); | 5446 | cursor_to (vpos, nlen); |
| 5447 | clear_end_of_line (FRAME_WINDOW_WIDTH (f)); | 5447 | clear_end_of_line (FRAME_TOTAL_COLS (f)); |
| 5448 | } | 5448 | } |
| 5449 | else | 5449 | else |
| 5450 | /* Make sure we are in the right row, otherwise cursor movement | 5450 | /* Make sure we are in the right row, otherwise cursor movement |
| @@ -5615,7 +5615,7 @@ update_frame_line (f, vpos) | |||
| 5615 | no need to do clear-to-eol at the end of this function | 5615 | no need to do clear-to-eol at the end of this function |
| 5616 | (and it would not be safe, since cursor is not going to | 5616 | (and it would not be safe, since cursor is not going to |
| 5617 | be "at the margin" after the text is done). */ | 5617 | be "at the margin" after the text is done). */ |
| 5618 | if (nlen == FRAME_WINDOW_WIDTH (f)) | 5618 | if (nlen == FRAME_TOTAL_COLS (f)) |
| 5619 | olen = 0; | 5619 | olen = 0; |
| 5620 | 5620 | ||
| 5621 | /* Function write_glyphs is prepared to do nothing | 5621 | /* Function write_glyphs is prepared to do nothing |
| @@ -5705,7 +5705,7 @@ buffer_posn_from_coords (w, x, y, object, pos) | |||
| 5705 | BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp))); | 5705 | BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp))); |
| 5706 | start_display (&it, w, startp); | 5706 | start_display (&it, w, startp); |
| 5707 | 5707 | ||
| 5708 | left_area_width = WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH (w); | 5708 | left_area_width = WINDOW_LEFT_MARGIN_WIDTH (w); |
| 5709 | move_it_to (&it, -1, *x + it.first_visible_x - left_area_width, *y, -1, | 5709 | move_it_to (&it, -1, *x + it.first_visible_x - left_area_width, *y, -1, |
| 5710 | MOVE_TO_X | MOVE_TO_Y); | 5710 | MOVE_TO_X | MOVE_TO_Y); |
| 5711 | 5711 | ||
| @@ -5743,13 +5743,6 @@ mode_line_string (w, x, y, part, charpos) | |||
| 5743 | 5743 | ||
| 5744 | if (row->mode_line_p && row->enabled_p) | 5744 | if (row->mode_line_p && row->enabled_p) |
| 5745 | { | 5745 | { |
| 5746 | /* The mode lines are displayed over scroll bars and fringes, | ||
| 5747 | and X is window-relative. Correct X by the scroll bar | ||
| 5748 | and fringe width. */ | ||
| 5749 | if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) | ||
| 5750 | x += FRAME_SCROLL_BAR_COLS (f) * CANON_X_UNIT (f); | ||
| 5751 | x += FRAME_LEFT_FRINGE_WIDTH (f); | ||
| 5752 | |||
| 5753 | /* Find the glyph under X. If we find one with a string object, | 5746 | /* Find the glyph under X. If we find one with a string object, |
| 5754 | it's the one we were looking for. */ | 5747 | it's the one we were looking for. */ |
| 5755 | glyph = row->glyphs[TEXT_AREA]; | 5748 | glyph = row->glyphs[TEXT_AREA]; |
| @@ -5801,11 +5794,18 @@ marginal_area_string (w, x, y, part, charpos) | |||
| 5801 | it's the one we were looking for. */ | 5794 | it's the one we were looking for. */ |
| 5802 | glyph = row->glyphs[area]; | 5795 | glyph = row->glyphs[area]; |
| 5803 | end = glyph + row->used[area]; | 5796 | end = glyph + row->used[area]; |
| 5797 | |||
| 5804 | if (area == RIGHT_MARGIN_AREA) | 5798 | if (area == RIGHT_MARGIN_AREA) |
| 5805 | x0 = (window_box_width (w, TEXT_AREA) | 5799 | x0 = ((WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) |
| 5806 | + window_box_width (w, LEFT_MARGIN_AREA)); | 5800 | ? WINDOW_LEFT_FRINGE_WIDTH (w) |
| 5801 | : WINDOW_TOTAL_FRINGE_WIDTH (w)) | ||
| 5802 | + window_box_width (w, LEFT_MARGIN_AREA) | ||
| 5803 | + window_box_width (w, TEXT_AREA)); | ||
| 5807 | else | 5804 | else |
| 5808 | x0 = 0; | 5805 | x0 = (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) |
| 5806 | ? WINDOW_LEFT_FRINGE_WIDTH (w) | ||
| 5807 | : 0); | ||
| 5808 | |||
| 5809 | for (; glyph < end; x0 += glyph->pixel_width, ++glyph) | 5809 | for (; glyph < end; x0 += glyph->pixel_width, ++glyph) |
| 5810 | if (x >= x0 && x < x0 + glyph->pixel_width) | 5810 | if (x >= x0 && x < x0 + glyph->pixel_width) |
| 5811 | { | 5811 | { |
| @@ -5885,11 +5885,9 @@ do_pending_window_change (safe) | |||
| 5885 | { | 5885 | { |
| 5886 | struct frame *f = XFRAME (frame); | 5886 | struct frame *f = XFRAME (frame); |
| 5887 | 5887 | ||
| 5888 | int height = FRAME_NEW_HEIGHT (f); | 5888 | if (f->new_text_lines != 0 || f->new_text_cols != 0) |
| 5889 | int width = FRAME_NEW_WIDTH (f); | 5889 | change_frame_size (f, f->new_text_lines, f->new_text_cols, |
| 5890 | 5890 | 0, 0, safe); | |
| 5891 | if (height != 0 || width != 0) | ||
| 5892 | change_frame_size (f, height, width, 0, 0, safe); | ||
| 5893 | } | 5891 | } |
| 5894 | } | 5892 | } |
| 5895 | } | 5893 | } |
| @@ -5931,38 +5929,38 @@ change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe) | |||
| 5931 | register struct frame *f; | 5929 | register struct frame *f; |
| 5932 | int newheight, newwidth, pretend, delay, safe; | 5930 | int newheight, newwidth, pretend, delay, safe; |
| 5933 | { | 5931 | { |
| 5934 | int new_frame_window_width; | 5932 | int new_frame_total_cols; |
| 5935 | int count = SPECPDL_INDEX (); | 5933 | int count = SPECPDL_INDEX (); |
| 5936 | 5934 | ||
| 5937 | /* If we can't deal with the change now, queue it for later. */ | 5935 | /* If we can't deal with the change now, queue it for later. */ |
| 5938 | if (delay || (redisplaying_p && !safe)) | 5936 | if (delay || (redisplaying_p && !safe)) |
| 5939 | { | 5937 | { |
| 5940 | FRAME_NEW_HEIGHT (f) = newheight; | 5938 | f->new_text_lines = newheight; |
| 5941 | FRAME_NEW_WIDTH (f) = newwidth; | 5939 | f->new_text_cols = newwidth; |
| 5942 | delayed_size_change = 1; | 5940 | delayed_size_change = 1; |
| 5943 | return; | 5941 | return; |
| 5944 | } | 5942 | } |
| 5945 | 5943 | ||
| 5946 | /* This size-change overrides any pending one for this frame. */ | 5944 | /* This size-change overrides any pending one for this frame. */ |
| 5947 | FRAME_NEW_HEIGHT (f) = 0; | 5945 | f->new_text_lines = 0; |
| 5948 | FRAME_NEW_WIDTH (f) = 0; | 5946 | f->new_text_cols = 0; |
| 5949 | 5947 | ||
| 5950 | /* If an argument is zero, set it to the current value. */ | 5948 | /* If an argument is zero, set it to the current value. */ |
| 5951 | if (newheight == 0) | 5949 | if (newheight == 0) |
| 5952 | newheight = FRAME_HEIGHT (f); | 5950 | newheight = FRAME_LINES (f); |
| 5953 | if (newwidth == 0) | 5951 | if (newwidth == 0) |
| 5954 | newwidth = FRAME_WIDTH (f); | 5952 | newwidth = FRAME_COLS (f); |
| 5955 | 5953 | ||
| 5956 | /* Compute width of windows in F. | 5954 | /* Compute width of windows in F. |
| 5957 | This is the width of the frame without vertical scroll bars. */ | 5955 | This is the width of the frame without vertical scroll bars. */ |
| 5958 | new_frame_window_width = FRAME_WINDOW_WIDTH_ARG (f, newwidth); | 5956 | new_frame_total_cols = FRAME_TOTAL_COLS_ARG (f, newwidth); |
| 5959 | 5957 | ||
| 5960 | /* Round up to the smallest acceptable size. */ | 5958 | /* Round up to the smallest acceptable size. */ |
| 5961 | check_frame_size (f, &newheight, &newwidth); | 5959 | check_frame_size (f, &newheight, &newwidth); |
| 5962 | 5960 | ||
| 5963 | /* If we're not changing the frame size, quit now. */ | 5961 | /* If we're not changing the frame size, quit now. */ |
| 5964 | if (newheight == FRAME_HEIGHT (f) | 5962 | if (newheight == FRAME_LINES (f) |
| 5965 | && new_frame_window_width == FRAME_WINDOW_WIDTH (f)) | 5963 | && new_frame_total_cols == FRAME_TOTAL_COLS (f)) |
| 5966 | return; | 5964 | return; |
| 5967 | 5965 | ||
| 5968 | BLOCK_INPUT; | 5966 | BLOCK_INPUT; |
| @@ -5974,19 +5972,19 @@ change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe) | |||
| 5974 | dos_set_window_size (&newheight, &newwidth); | 5972 | dos_set_window_size (&newheight, &newwidth); |
| 5975 | #endif | 5973 | #endif |
| 5976 | 5974 | ||
| 5977 | if (newheight != FRAME_HEIGHT (f)) | 5975 | if (newheight != FRAME_LINES (f)) |
| 5978 | { | 5976 | { |
| 5979 | if (FRAME_HAS_MINIBUF_P (f) && !FRAME_MINIBUF_ONLY_P (f)) | 5977 | if (FRAME_HAS_MINIBUF_P (f) && !FRAME_MINIBUF_ONLY_P (f)) |
| 5980 | { | 5978 | { |
| 5981 | /* Frame has both root and mini-buffer. */ | 5979 | /* Frame has both root and mini-buffer. */ |
| 5982 | XSETFASTINT (XWINDOW (FRAME_ROOT_WINDOW (f))->top, | 5980 | XSETFASTINT (XWINDOW (FRAME_ROOT_WINDOW (f))->top_line, |
| 5983 | FRAME_TOP_MARGIN (f)); | 5981 | FRAME_TOP_MARGIN (f)); |
| 5984 | set_window_height (FRAME_ROOT_WINDOW (f), | 5982 | set_window_height (FRAME_ROOT_WINDOW (f), |
| 5985 | (newheight | 5983 | (newheight |
| 5986 | - 1 | 5984 | - 1 |
| 5987 | - FRAME_TOP_MARGIN (f)), | 5985 | - FRAME_TOP_MARGIN (f)), |
| 5988 | 0); | 5986 | 0); |
| 5989 | XSETFASTINT (XWINDOW (FRAME_MINIBUF_WINDOW (f))->top, | 5987 | XSETFASTINT (XWINDOW (FRAME_MINIBUF_WINDOW (f))->top_line, |
| 5990 | newheight - 1); | 5988 | newheight - 1); |
| 5991 | set_window_height (FRAME_MINIBUF_WINDOW (f), 1, 0); | 5989 | set_window_height (FRAME_MINIBUF_WINDOW (f), 1, 0); |
| 5992 | } | 5990 | } |
| @@ -5999,21 +5997,21 @@ change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe) | |||
| 5999 | FrameRows = newheight; | 5997 | FrameRows = newheight; |
| 6000 | } | 5998 | } |
| 6001 | 5999 | ||
| 6002 | if (new_frame_window_width != FRAME_WINDOW_WIDTH (f)) | 6000 | if (new_frame_total_cols != FRAME_TOTAL_COLS (f)) |
| 6003 | { | 6001 | { |
| 6004 | set_window_width (FRAME_ROOT_WINDOW (f), new_frame_window_width, 0); | 6002 | set_window_width (FRAME_ROOT_WINDOW (f), new_frame_total_cols, 0); |
| 6005 | if (FRAME_HAS_MINIBUF_P (f)) | 6003 | if (FRAME_HAS_MINIBUF_P (f)) |
| 6006 | set_window_width (FRAME_MINIBUF_WINDOW (f), new_frame_window_width, 0); | 6004 | set_window_width (FRAME_MINIBUF_WINDOW (f), new_frame_total_cols, 0); |
| 6007 | 6005 | ||
| 6008 | if (FRAME_TERMCAP_P (f) && !pretend) | 6006 | if (FRAME_TERMCAP_P (f) && !pretend) |
| 6009 | FrameCols = newwidth; | 6007 | FrameCols = newwidth; |
| 6010 | 6008 | ||
| 6011 | if (WINDOWP (f->tool_bar_window)) | 6009 | if (WINDOWP (f->tool_bar_window)) |
| 6012 | XSETFASTINT (XWINDOW (f->tool_bar_window)->width, newwidth); | 6010 | XSETFASTINT (XWINDOW (f->tool_bar_window)->total_cols, newwidth); |
| 6013 | } | 6011 | } |
| 6014 | 6012 | ||
| 6015 | FRAME_HEIGHT (f) = newheight; | 6013 | FRAME_LINES (f) = newheight; |
| 6016 | SET_FRAME_WIDTH (f, newwidth); | 6014 | SET_FRAME_COLS (f, newwidth); |
| 6017 | 6015 | ||
| 6018 | { | 6016 | { |
| 6019 | struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); | 6017 | struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); |
| @@ -6038,7 +6036,7 @@ change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe) | |||
| 6038 | 6036 | ||
| 6039 | /* This isn't quite a no-op: it runs window-configuration-change-hook. */ | 6037 | /* This isn't quite a no-op: it runs window-configuration-change-hook. */ |
| 6040 | Fset_window_buffer (FRAME_SELECTED_WINDOW (f), | 6038 | Fset_window_buffer (FRAME_SELECTED_WINDOW (f), |
| 6041 | XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer); | 6039 | XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer, Qt); |
| 6042 | 6040 | ||
| 6043 | unbind_to (count, Qnil); | 6041 | unbind_to (count, Qnil); |
| 6044 | } | 6042 | } |
| @@ -6537,8 +6535,8 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\ | |||
| 6537 | 6535 | ||
| 6538 | { | 6536 | { |
| 6539 | struct frame *sf = SELECTED_FRAME (); | 6537 | struct frame *sf = SELECTED_FRAME (); |
| 6540 | int width = FRAME_WINDOW_WIDTH (sf); | 6538 | int width = FRAME_TOTAL_COLS (sf); |
| 6541 | int height = FRAME_HEIGHT (sf); | 6539 | int height = FRAME_LINES (sf); |
| 6542 | 6540 | ||
| 6543 | unsigned int total_glyphs = height * (width + 2) * sizeof (struct glyph); | 6541 | unsigned int total_glyphs = height * (width + 2) * sizeof (struct glyph); |
| 6544 | 6542 | ||