diff options
| author | Bastien | 2017-07-03 09:06:29 +0200 |
|---|---|---|
| committer | Bastien | 2017-07-03 09:06:29 +0200 |
| commit | 5ca1888fe670aee7febd4d42665d7372ab2ffebc (patch) | |
| tree | 1f7f8d8a7580e556fc83cf3a6aaeec567b33a090 /src/xdisp.c | |
| parent | 20e006ffee41062f1b551a92c24d9edc53cd0f56 (diff) | |
| parent | 1b4f0a92ff3505ef9a465b9b391756e3a73a6443 (diff) | |
| download | emacs-5ca1888fe670aee7febd4d42665d7372ab2ffebc.tar.gz emacs-5ca1888fe670aee7febd4d42665d7372ab2ffebc.zip | |
Merge branch 'master' into scratch/org-mode-merge
Diffstat (limited to 'src/xdisp.c')
| -rw-r--r-- | src/xdisp.c | 190 |
1 files changed, 145 insertions, 45 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 34ee877e6be..8bc5d81f448 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -921,7 +921,7 @@ window_text_bottom_y (struct window *w) | |||
| 921 | 921 | ||
| 922 | height -= WINDOW_BOTTOM_DIVIDER_WIDTH (w); | 922 | height -= WINDOW_BOTTOM_DIVIDER_WIDTH (w); |
| 923 | 923 | ||
| 924 | if (WINDOW_WANTS_MODELINE_P (w)) | 924 | if (window_wants_mode_line (w)) |
| 925 | height -= CURRENT_MODE_LINE_HEIGHT (w); | 925 | height -= CURRENT_MODE_LINE_HEIGHT (w); |
| 926 | 926 | ||
| 927 | height -= WINDOW_SCROLL_BAR_AREA_HEIGHT (w); | 927 | height -= WINDOW_SCROLL_BAR_AREA_HEIGHT (w); |
| @@ -978,7 +978,7 @@ window_box_height (struct window *w) | |||
| 978 | the appropriate glyph row has its `mode_line_p' flag set, | 978 | the appropriate glyph row has its `mode_line_p' flag set, |
| 979 | and if it doesn't, uses estimate_mode_line_height instead. */ | 979 | and if it doesn't, uses estimate_mode_line_height instead. */ |
| 980 | 980 | ||
| 981 | if (WINDOW_WANTS_MODELINE_P (w)) | 981 | if (window_wants_mode_line (w)) |
| 982 | { | 982 | { |
| 983 | struct glyph_row *ml_row | 983 | struct glyph_row *ml_row |
| 984 | = (w->current_matrix && w->current_matrix->rows | 984 | = (w->current_matrix && w->current_matrix->rows |
| @@ -990,7 +990,7 @@ window_box_height (struct window *w) | |||
| 990 | height -= estimate_mode_line_height (f, CURRENT_MODE_LINE_FACE_ID (w)); | 990 | height -= estimate_mode_line_height (f, CURRENT_MODE_LINE_FACE_ID (w)); |
| 991 | } | 991 | } |
| 992 | 992 | ||
| 993 | if (WINDOW_WANTS_HEADER_LINE_P (w)) | 993 | if (window_wants_header_line (w)) |
| 994 | { | 994 | { |
| 995 | struct glyph_row *hl_row | 995 | struct glyph_row *hl_row |
| 996 | = (w->current_matrix && w->current_matrix->rows | 996 | = (w->current_matrix && w->current_matrix->rows |
| @@ -1102,7 +1102,7 @@ window_box (struct window *w, enum glyph_row_area area, int *box_x, | |||
| 1102 | if (box_y) | 1102 | if (box_y) |
| 1103 | { | 1103 | { |
| 1104 | *box_y = WINDOW_TOP_EDGE_Y (w); | 1104 | *box_y = WINDOW_TOP_EDGE_Y (w); |
| 1105 | if (WINDOW_WANTS_HEADER_LINE_P (w)) | 1105 | if (window_wants_header_line (w)) |
| 1106 | *box_y += CURRENT_HEADER_LINE_HEIGHT (w); | 1106 | *box_y += CURRENT_HEADER_LINE_HEIGHT (w); |
| 1107 | } | 1107 | } |
| 1108 | } | 1108 | } |
| @@ -1322,15 +1322,29 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, | |||
| 1322 | return visible_p; | 1322 | return visible_p; |
| 1323 | 1323 | ||
| 1324 | /* Compute exact mode line heights. */ | 1324 | /* Compute exact mode line heights. */ |
| 1325 | if (WINDOW_WANTS_MODELINE_P (w)) | 1325 | if (window_wants_mode_line (w)) |
| 1326 | w->mode_line_height | 1326 | { |
| 1327 | = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w), | 1327 | Lisp_Object window_mode_line_format |
| 1328 | BVAR (current_buffer, mode_line_format)); | 1328 | = window_parameter (w, Qmode_line_format); |
| 1329 | |||
| 1330 | w->mode_line_height | ||
| 1331 | = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w), | ||
| 1332 | NILP (window_mode_line_format) | ||
| 1333 | ? BVAR (current_buffer, mode_line_format) | ||
| 1334 | : window_mode_line_format); | ||
| 1335 | } | ||
| 1329 | 1336 | ||
| 1330 | if (WINDOW_WANTS_HEADER_LINE_P (w)) | 1337 | if (window_wants_header_line (w)) |
| 1331 | w->header_line_height | 1338 | { |
| 1332 | = display_mode_line (w, HEADER_LINE_FACE_ID, | 1339 | Lisp_Object window_header_line_format |
| 1333 | BVAR (current_buffer, header_line_format)); | 1340 | = window_parameter (w, Qheader_line_format); |
| 1341 | |||
| 1342 | w->header_line_height | ||
| 1343 | = display_mode_line (w, HEADER_LINE_FACE_ID, | ||
| 1344 | NILP (window_header_line_format) | ||
| 1345 | ? BVAR (current_buffer, header_line_format) | ||
| 1346 | : window_header_line_format); | ||
| 1347 | } | ||
| 1334 | 1348 | ||
| 1335 | start_display (&it, w, top); | 1349 | start_display (&it, w, top); |
| 1336 | move_it_to (&it, charpos, -1, it.last_visible_y - 1, -1, | 1350 | move_it_to (&it, charpos, -1, it.last_visible_y - 1, -1, |
| @@ -2842,13 +2856,12 @@ init_iterator (struct it *it, struct window *w, | |||
| 2842 | 2856 | ||
| 2843 | /* Get dimensions of truncation and continuation glyphs. These are | 2857 | /* Get dimensions of truncation and continuation glyphs. These are |
| 2844 | displayed as fringe bitmaps under X, but we need them for such | 2858 | displayed as fringe bitmaps under X, but we need them for such |
| 2845 | frames when the fringes are turned off. But leave the dimensions | 2859 | frames when the fringes are turned off. The no_special_glyphs slot |
| 2846 | zero for tooltip frames, as these glyphs look ugly there and also | 2860 | of the iterator's frame, when set, suppresses their display - by |
| 2847 | sabotage calculations of tooltip dimensions in x-show-tip. */ | 2861 | default for tooltip frames and when set via the 'no-special-glyphs' |
| 2862 | frame parameter. */ | ||
| 2848 | #ifdef HAVE_WINDOW_SYSTEM | 2863 | #ifdef HAVE_WINDOW_SYSTEM |
| 2849 | if (!(FRAME_WINDOW_P (it->f) | 2864 | if (!(FRAME_WINDOW_P (it->f) && it->f->no_special_glyphs)) |
| 2850 | && FRAMEP (tip_frame) | ||
| 2851 | && it->f == XFRAME (tip_frame))) | ||
| 2852 | #endif | 2865 | #endif |
| 2853 | { | 2866 | { |
| 2854 | if (it->line_wrap == TRUNCATE) | 2867 | if (it->line_wrap == TRUNCATE) |
| @@ -2920,7 +2933,7 @@ init_iterator (struct it *it, struct window *w, | |||
| 2920 | it->last_visible_x -= it->continuation_pixel_width; | 2933 | it->last_visible_x -= it->continuation_pixel_width; |
| 2921 | } | 2934 | } |
| 2922 | 2935 | ||
| 2923 | it->header_line_p = WINDOW_WANTS_HEADER_LINE_P (w); | 2936 | it->header_line_p = window_wants_header_line (w); |
| 2924 | it->current_y = WINDOW_HEADER_LINE_HEIGHT (w) + w->vscroll; | 2937 | it->current_y = WINDOW_HEADER_LINE_HEIGHT (w) + w->vscroll; |
| 2925 | } | 2938 | } |
| 2926 | 2939 | ||
| @@ -3019,7 +3032,7 @@ void | |||
| 3019 | start_display (struct it *it, struct window *w, struct text_pos pos) | 3032 | start_display (struct it *it, struct window *w, struct text_pos pos) |
| 3020 | { | 3033 | { |
| 3021 | struct glyph_row *row; | 3034 | struct glyph_row *row; |
| 3022 | bool first_vpos = WINDOW_WANTS_HEADER_LINE_P (w); | 3035 | bool first_vpos = window_wants_header_line (w); |
| 3023 | 3036 | ||
| 3024 | row = w->desired_matrix->rows + first_vpos; | 3037 | row = w->desired_matrix->rows + first_vpos; |
| 3025 | init_iterator (it, w, CHARPOS (pos), BYTEPOS (pos), row, DEFAULT_FACE_ID); | 3038 | init_iterator (it, w, CHARPOS (pos), BYTEPOS (pos), row, DEFAULT_FACE_ID); |
| @@ -7755,9 +7768,8 @@ next_element_from_display_vector (struct it *it) | |||
| 7755 | 7768 | ||
| 7756 | /* KFS: This code used to check ip->dpvec[0] instead of the current element. | 7769 | /* KFS: This code used to check ip->dpvec[0] instead of the current element. |
| 7757 | That seemed totally bogus - so I changed it... */ | 7770 | That seemed totally bogus - so I changed it... */ |
| 7758 | gc = it->dpvec[it->current.dpvec_index]; | 7771 | if (it->dpend - it->dpvec > 0 /* empty dpvec[] is invalid */ |
| 7759 | 7772 | && (gc = it->dpvec[it->current.dpvec_index], GLYPH_CODE_P (gc))) | |
| 7760 | if (GLYPH_CODE_P (gc)) | ||
| 7761 | { | 7773 | { |
| 7762 | struct face *this_face, *prev_face, *next_face; | 7774 | struct face *this_face, *prev_face, *next_face; |
| 7763 | 7775 | ||
| @@ -15799,7 +15811,7 @@ compute_window_start_on_continuation_line (struct window *w) | |||
| 15799 | 15811 | ||
| 15800 | /* Find the start of the continued line. This should be fast | 15812 | /* Find the start of the continued line. This should be fast |
| 15801 | because find_newline is fast (newline cache). */ | 15813 | because find_newline is fast (newline cache). */ |
| 15802 | row = w->desired_matrix->rows + WINDOW_WANTS_HEADER_LINE_P (w); | 15814 | row = w->desired_matrix->rows + window_wants_header_line (w); |
| 15803 | init_iterator (&it, w, CHARPOS (start_pos), BYTEPOS (start_pos), | 15815 | init_iterator (&it, w, CHARPOS (start_pos), BYTEPOS (start_pos), |
| 15804 | row, DEFAULT_FACE_ID); | 15816 | row, DEFAULT_FACE_ID); |
| 15805 | reseat_at_previous_visible_line_start (&it); | 15817 | reseat_at_previous_visible_line_start (&it); |
| @@ -15949,7 +15961,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, | |||
| 15949 | this_scroll_margin = window_scroll_margin (w, MARGIN_IN_PIXELS); | 15961 | this_scroll_margin = window_scroll_margin (w, MARGIN_IN_PIXELS); |
| 15950 | 15962 | ||
| 15951 | top_scroll_margin = this_scroll_margin; | 15963 | top_scroll_margin = this_scroll_margin; |
| 15952 | if (WINDOW_WANTS_HEADER_LINE_P (w)) | 15964 | if (window_wants_header_line (w)) |
| 15953 | top_scroll_margin += CURRENT_HEADER_LINE_HEIGHT (w); | 15965 | top_scroll_margin += CURRENT_HEADER_LINE_HEIGHT (w); |
| 15954 | 15966 | ||
| 15955 | /* Start with the row the cursor was displayed during the last | 15967 | /* Start with the row the cursor was displayed during the last |
| @@ -16732,7 +16744,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) | |||
| 16732 | margin, even though this part handles windows that didn't | 16744 | margin, even though this part handles windows that didn't |
| 16733 | scroll at all. */ | 16745 | scroll at all. */ |
| 16734 | int pixel_margin = margin * frame_line_height; | 16746 | int pixel_margin = margin * frame_line_height; |
| 16735 | bool header_line = WINDOW_WANTS_HEADER_LINE_P (w); | 16747 | bool header_line = window_wants_header_line (w); |
| 16736 | 16748 | ||
| 16737 | /* Note: We add an extra FRAME_LINE_HEIGHT, because the loop | 16749 | /* Note: We add an extra FRAME_LINE_HEIGHT, because the loop |
| 16738 | below, which finds the row to move point to, advances by | 16750 | below, which finds the row to move point to, advances by |
| @@ -17299,15 +17311,15 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) | |||
| 17299 | || (w->column_number_displayed != -1 | 17311 | || (w->column_number_displayed != -1 |
| 17300 | && (w->column_number_displayed != current_column ()))) | 17312 | && (w->column_number_displayed != current_column ()))) |
| 17301 | /* This means that the window has a mode line. */ | 17313 | /* This means that the window has a mode line. */ |
| 17302 | && (WINDOW_WANTS_MODELINE_P (w) | 17314 | && (window_wants_mode_line (w) |
| 17303 | || WINDOW_WANTS_HEADER_LINE_P (w))) | 17315 | || window_wants_header_line (w))) |
| 17304 | { | 17316 | { |
| 17305 | 17317 | ||
| 17306 | display_mode_lines (w); | 17318 | display_mode_lines (w); |
| 17307 | 17319 | ||
| 17308 | /* If mode line height has changed, arrange for a thorough | 17320 | /* If mode line height has changed, arrange for a thorough |
| 17309 | immediate redisplay using the correct mode line height. */ | 17321 | immediate redisplay using the correct mode line height. */ |
| 17310 | if (WINDOW_WANTS_MODELINE_P (w) | 17322 | if (window_wants_mode_line (w) |
| 17311 | && CURRENT_MODE_LINE_HEIGHT (w) != DESIRED_MODE_LINE_HEIGHT (w)) | 17323 | && CURRENT_MODE_LINE_HEIGHT (w) != DESIRED_MODE_LINE_HEIGHT (w)) |
| 17312 | { | 17324 | { |
| 17313 | f->fonts_changed = true; | 17325 | f->fonts_changed = true; |
| @@ -17318,7 +17330,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) | |||
| 17318 | 17330 | ||
| 17319 | /* If header line height has changed, arrange for a thorough | 17331 | /* If header line height has changed, arrange for a thorough |
| 17320 | immediate redisplay using the correct header line height. */ | 17332 | immediate redisplay using the correct header line height. */ |
| 17321 | if (WINDOW_WANTS_HEADER_LINE_P (w) | 17333 | if (window_wants_header_line (w) |
| 17322 | && CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w)) | 17334 | && CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w)) |
| 17323 | { | 17335 | { |
| 17324 | f->fonts_changed = true; | 17336 | f->fonts_changed = true; |
| @@ -17583,7 +17595,7 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 17583 | return false; | 17595 | return false; |
| 17584 | 17596 | ||
| 17585 | /* If top-line visibility has changed, give up. */ | 17597 | /* If top-line visibility has changed, give up. */ |
| 17586 | if (WINDOW_WANTS_HEADER_LINE_P (w) | 17598 | if (window_wants_header_line (w) |
| 17587 | != MATRIX_HEADER_LINE_ROW (w->current_matrix)->mode_line_p) | 17599 | != MATRIX_HEADER_LINE_ROW (w->current_matrix)->mode_line_p) |
| 17588 | return false; | 17600 | return false; |
| 17589 | 17601 | ||
| @@ -18818,7 +18830,7 @@ try_window_id (struct window *w) | |||
| 18818 | = MATRIX_ROW_VPOS (first_unchanged_at_end_row, w->current_matrix); | 18830 | = MATRIX_ROW_VPOS (first_unchanged_at_end_row, w->current_matrix); |
| 18819 | int from = WINDOW_TOP_EDGE_LINE (w) + from_vpos; | 18831 | int from = WINDOW_TOP_EDGE_LINE (w) + from_vpos; |
| 18820 | int end = (WINDOW_TOP_EDGE_LINE (w) | 18832 | int end = (WINDOW_TOP_EDGE_LINE (w) |
| 18821 | + WINDOW_WANTS_HEADER_LINE_P (w) | 18833 | + window_wants_header_line (w) |
| 18822 | + window_internal_height (w)); | 18834 | + window_internal_height (w)); |
| 18823 | 18835 | ||
| 18824 | #if defined (HAVE_GPM) || defined (MSDOS) | 18836 | #if defined (HAVE_GPM) || defined (MSDOS) |
| @@ -18996,7 +19008,7 @@ try_window_id (struct window *w) | |||
| 18996 | { | 19008 | { |
| 18997 | /* Displayed to end of window, but no line containing text was | 19009 | /* Displayed to end of window, but no line containing text was |
| 18998 | displayed. Lines were deleted at the end of the window. */ | 19010 | displayed. Lines were deleted at the end of the window. */ |
| 18999 | bool first_vpos = WINDOW_WANTS_HEADER_LINE_P (w); | 19011 | bool first_vpos = window_wants_header_line (w); |
| 19000 | int vpos = w->window_end_vpos; | 19012 | int vpos = w->window_end_vpos; |
| 19001 | struct glyph_row *current_row = current_matrix->rows + vpos; | 19013 | struct glyph_row *current_row = current_matrix->rows + vpos; |
| 19002 | struct glyph_row *desired_row = desired_matrix->rows + vpos; | 19014 | struct glyph_row *desired_row = desired_matrix->rows + vpos; |
| @@ -20696,7 +20708,7 @@ display_line (struct it *it, int cursor_vpos) | |||
| 20696 | ptrdiff_t min_pos = ZV + 1, max_pos = 0; | 20708 | ptrdiff_t min_pos = ZV + 1, max_pos = 0; |
| 20697 | ptrdiff_t min_bpos UNINIT, max_bpos UNINIT; | 20709 | ptrdiff_t min_bpos UNINIT, max_bpos UNINIT; |
| 20698 | bool pending_handle_line_prefix = false; | 20710 | bool pending_handle_line_prefix = false; |
| 20699 | int header_line = WINDOW_WANTS_HEADER_LINE_P (it->w); | 20711 | int header_line = window_wants_header_line (it->w); |
| 20700 | bool hscroll_this_line = (cursor_vpos >= 0 | 20712 | bool hscroll_this_line = (cursor_vpos >= 0 |
| 20701 | && it->vpos == cursor_vpos - header_line | 20713 | && it->vpos == cursor_vpos - header_line |
| 20702 | && hscrolling_current_line_p (it->w)); | 20714 | && hscrolling_current_line_p (it->w)); |
| @@ -22649,20 +22661,30 @@ display_mode_lines (struct window *w) | |||
| 22649 | line_number_displayed = false; | 22661 | line_number_displayed = false; |
| 22650 | w->column_number_displayed = -1; | 22662 | w->column_number_displayed = -1; |
| 22651 | 22663 | ||
| 22652 | if (WINDOW_WANTS_MODELINE_P (w)) | 22664 | if (window_wants_mode_line (w)) |
| 22653 | { | 22665 | { |
| 22666 | Lisp_Object window_mode_line_format | ||
| 22667 | = window_parameter (w, Qmode_line_format); | ||
| 22668 | |||
| 22654 | struct window *sel_w = XWINDOW (old_selected_window); | 22669 | struct window *sel_w = XWINDOW (old_selected_window); |
| 22655 | 22670 | ||
| 22656 | /* Select mode line face based on the real selected window. */ | 22671 | /* Select mode line face based on the real selected window. */ |
| 22657 | display_mode_line (w, CURRENT_MODE_LINE_FACE_ID_3 (sel_w, sel_w, w), | 22672 | display_mode_line (w, CURRENT_MODE_LINE_FACE_ID_3 (sel_w, sel_w, w), |
| 22658 | BVAR (current_buffer, mode_line_format)); | 22673 | NILP (window_mode_line_format) |
| 22674 | ? BVAR (current_buffer, mode_line_format) | ||
| 22675 | : window_mode_line_format); | ||
| 22659 | ++n; | 22676 | ++n; |
| 22660 | } | 22677 | } |
| 22661 | 22678 | ||
| 22662 | if (WINDOW_WANTS_HEADER_LINE_P (w)) | 22679 | if (window_wants_header_line (w)) |
| 22663 | { | 22680 | { |
| 22681 | Lisp_Object window_header_line_format | ||
| 22682 | = window_parameter (w, Qheader_line_format); | ||
| 22683 | |||
| 22664 | display_mode_line (w, HEADER_LINE_FACE_ID, | 22684 | display_mode_line (w, HEADER_LINE_FACE_ID, |
| 22665 | BVAR (current_buffer, header_line_format)); | 22685 | NILP (window_header_line_format) |
| 22686 | ? BVAR (current_buffer, header_line_format) | ||
| 22687 | : window_header_line_format); | ||
| 22666 | ++n; | 22688 | ++n; |
| 22667 | } | 22689 | } |
| 22668 | 22690 | ||
| @@ -30442,13 +30464,67 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 30442 | && part != ON_HEADER_LINE)) | 30464 | && part != ON_HEADER_LINE)) |
| 30443 | clear_mouse_face (hlinfo); | 30465 | clear_mouse_face (hlinfo); |
| 30444 | 30466 | ||
| 30467 | /* Reset help_echo_string. It will get recomputed below. */ | ||
| 30468 | help_echo_string = Qnil; | ||
| 30469 | |||
| 30470 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 30471 | /* If the cursor is on the internal border of FRAME and FRAME's | ||
| 30472 | internal border is draggable, provide some visual feedback. */ | ||
| 30473 | if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0 | ||
| 30474 | && !NILP (get_frame_param (f, Qdrag_internal_border))) | ||
| 30475 | { | ||
| 30476 | enum internal_border_part part = frame_internal_border_part (f, x, y); | ||
| 30477 | |||
| 30478 | switch (part) | ||
| 30479 | { | ||
| 30480 | case INTERNAL_BORDER_NONE: | ||
| 30481 | if (cursor != FRAME_X_OUTPUT (f)->nontext_cursor) | ||
| 30482 | /* Reset cursor. */ | ||
| 30483 | cursor = FRAME_X_OUTPUT (f)->nontext_cursor; | ||
| 30484 | break; | ||
| 30485 | case INTERNAL_BORDER_LEFT_EDGE: | ||
| 30486 | cursor = FRAME_X_OUTPUT (f)->left_edge_cursor; | ||
| 30487 | break; | ||
| 30488 | case INTERNAL_BORDER_TOP_LEFT_CORNER: | ||
| 30489 | cursor = FRAME_X_OUTPUT (f)->top_left_corner_cursor; | ||
| 30490 | break; | ||
| 30491 | case INTERNAL_BORDER_TOP_EDGE: | ||
| 30492 | cursor = FRAME_X_OUTPUT (f)->top_edge_cursor; | ||
| 30493 | break; | ||
| 30494 | case INTERNAL_BORDER_TOP_RIGHT_CORNER: | ||
| 30495 | cursor = FRAME_X_OUTPUT (f)->top_right_corner_cursor; | ||
| 30496 | break; | ||
| 30497 | case INTERNAL_BORDER_RIGHT_EDGE: | ||
| 30498 | cursor = FRAME_X_OUTPUT (f)->right_edge_cursor; | ||
| 30499 | break; | ||
| 30500 | case INTERNAL_BORDER_BOTTOM_RIGHT_CORNER: | ||
| 30501 | cursor = FRAME_X_OUTPUT (f)->bottom_right_corner_cursor; | ||
| 30502 | break; | ||
| 30503 | case INTERNAL_BORDER_BOTTOM_EDGE: | ||
| 30504 | cursor = FRAME_X_OUTPUT (f)->bottom_edge_cursor; | ||
| 30505 | break; | ||
| 30506 | case INTERNAL_BORDER_BOTTOM_LEFT_CORNER: | ||
| 30507 | cursor = FRAME_X_OUTPUT (f)->bottom_left_corner_cursor; | ||
| 30508 | break; | ||
| 30509 | default: | ||
| 30510 | /* This should not happen. */ | ||
| 30511 | if (cursor != FRAME_X_OUTPUT (f)->nontext_cursor) | ||
| 30512 | cursor = FRAME_X_OUTPUT (f)->nontext_cursor; | ||
| 30513 | } | ||
| 30514 | |||
| 30515 | if (cursor != FRAME_X_OUTPUT (f)->nontext_cursor) | ||
| 30516 | { | ||
| 30517 | /* Do we really want a help echo here? */ | ||
| 30518 | help_echo_string = build_string ("drag-mouse-1: resize frame"); | ||
| 30519 | goto set_cursor; | ||
| 30520 | } | ||
| 30521 | } | ||
| 30522 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 30523 | |||
| 30445 | /* Not on a window -> return. */ | 30524 | /* Not on a window -> return. */ |
| 30446 | if (!WINDOWP (window)) | 30525 | if (!WINDOWP (window)) |
| 30447 | return; | 30526 | return; |
| 30448 | 30527 | ||
| 30449 | /* Reset help_echo_string. It will get recomputed below. */ | ||
| 30450 | help_echo_string = Qnil; | ||
| 30451 | |||
| 30452 | /* Convert to window-relative pixel coordinates. */ | 30528 | /* Convert to window-relative pixel coordinates. */ |
| 30453 | w = XWINDOW (window); | 30529 | w = XWINDOW (window); |
| 30454 | frame_to_window_pixel_xy (w, &x, &y); | 30530 | frame_to_window_pixel_xy (w, &x, &y); |
| @@ -30486,11 +30562,13 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 30486 | { | 30562 | { |
| 30487 | cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor; | 30563 | cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor; |
| 30488 | help_echo_string = build_string ("drag-mouse-1: resize"); | 30564 | help_echo_string = build_string ("drag-mouse-1: resize"); |
| 30565 | goto set_cursor; | ||
| 30489 | } | 30566 | } |
| 30490 | else if (part == ON_RIGHT_DIVIDER) | 30567 | else if (part == ON_RIGHT_DIVIDER) |
| 30491 | { | 30568 | { |
| 30492 | cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor; | 30569 | cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor; |
| 30493 | help_echo_string = build_string ("drag-mouse-1: resize"); | 30570 | help_echo_string = build_string ("drag-mouse-1: resize"); |
| 30571 | goto set_cursor; | ||
| 30494 | } | 30572 | } |
| 30495 | else if (part == ON_BOTTOM_DIVIDER) | 30573 | else if (part == ON_BOTTOM_DIVIDER) |
| 30496 | if (! WINDOW_BOTTOMMOST_P (w) | 30574 | if (! WINDOW_BOTTOMMOST_P (w) |
| @@ -30499,6 +30577,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 30499 | { | 30577 | { |
| 30500 | cursor = FRAME_X_OUTPUT (f)->vertical_drag_cursor; | 30578 | cursor = FRAME_X_OUTPUT (f)->vertical_drag_cursor; |
| 30501 | help_echo_string = build_string ("drag-mouse-1: resize"); | 30579 | help_echo_string = build_string ("drag-mouse-1: resize"); |
| 30580 | goto set_cursor; | ||
| 30502 | } | 30581 | } |
| 30503 | else | 30582 | else |
| 30504 | cursor = FRAME_X_OUTPUT (f)->nontext_cursor; | 30583 | cursor = FRAME_X_OUTPUT (f)->nontext_cursor; |
| @@ -31193,8 +31272,15 @@ x_draw_right_divider (struct window *w) | |||
| 31193 | int x0 = WINDOW_RIGHT_EDGE_X (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w); | 31272 | int x0 = WINDOW_RIGHT_EDGE_X (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w); |
| 31194 | int x1 = WINDOW_RIGHT_EDGE_X (w); | 31273 | int x1 = WINDOW_RIGHT_EDGE_X (w); |
| 31195 | int y0 = WINDOW_TOP_EDGE_Y (w); | 31274 | int y0 = WINDOW_TOP_EDGE_Y (w); |
| 31196 | /* The bottom divider prevails. */ | 31275 | int y1 = WINDOW_BOTTOM_EDGE_Y (w); |
| 31197 | int y1 = WINDOW_BOTTOM_EDGE_Y (w) - WINDOW_BOTTOM_DIVIDER_WIDTH (w); | 31276 | |
| 31277 | /* If W is horizontally combined and has a right sibling, don't | ||
| 31278 | draw over any bottom divider. */ | ||
| 31279 | if (WINDOW_BOTTOM_DIVIDER_WIDTH (w) | ||
| 31280 | && !NILP (w->parent) | ||
| 31281 | && WINDOW_HORIZONTAL_COMBINATION_P (XWINDOW (w->parent)) | ||
| 31282 | && !NILP (w->next)) | ||
| 31283 | y1 -= WINDOW_BOTTOM_DIVIDER_WIDTH (w); | ||
| 31198 | 31284 | ||
| 31199 | FRAME_RIF (f)->draw_window_divider (w, x0, x1, y0, y1); | 31285 | FRAME_RIF (f)->draw_window_divider (w, x0, x1, y0, y1); |
| 31200 | } | 31286 | } |
| @@ -31213,8 +31299,22 @@ x_draw_bottom_divider (struct window *w) | |||
| 31213 | int x1 = WINDOW_RIGHT_EDGE_X (w); | 31299 | int x1 = WINDOW_RIGHT_EDGE_X (w); |
| 31214 | int y0 = WINDOW_BOTTOM_EDGE_Y (w) - WINDOW_BOTTOM_DIVIDER_WIDTH (w); | 31300 | int y0 = WINDOW_BOTTOM_EDGE_Y (w) - WINDOW_BOTTOM_DIVIDER_WIDTH (w); |
| 31215 | int y1 = WINDOW_BOTTOM_EDGE_Y (w); | 31301 | int y1 = WINDOW_BOTTOM_EDGE_Y (w); |
| 31302 | struct window *p = !NILP (w->parent) ? XWINDOW (w->parent) : false; | ||
| 31216 | 31303 | ||
| 31217 | FRAME_RIF (f)->draw_window_divider (w, x0, x1, y0, y1); | 31304 | /* If W is vertically combined and has a sibling below, don't draw |
| 31305 | over any right divider. */ | ||
| 31306 | if (WINDOW_RIGHT_DIVIDER_WIDTH (w) | ||
| 31307 | && p | ||
| 31308 | && ((WINDOW_VERTICAL_COMBINATION_P (p) | ||
| 31309 | && !NILP (w->next)) | ||
| 31310 | || (WINDOW_HORIZONTAL_COMBINATION_P (p) | ||
| 31311 | && NILP (w->next) | ||
| 31312 | && !NILP (p->parent) | ||
| 31313 | && WINDOW_VERTICAL_COMBINATION_P (XWINDOW (p->parent)) | ||
| 31314 | && !NILP (XWINDOW (p->parent)->next)))) | ||
| 31315 | x1 -= WINDOW_RIGHT_DIVIDER_WIDTH (w); | ||
| 31316 | |||
| 31317 | FRAME_RIF (f)->draw_window_divider (w, x0, x1, y0, y1); | ||
| 31218 | } | 31318 | } |
| 31219 | } | 31319 | } |
| 31220 | 31320 | ||
| @@ -31329,7 +31429,7 @@ expose_window (struct window *w, XRectangle *fr) | |||
| 31329 | } | 31429 | } |
| 31330 | 31430 | ||
| 31331 | /* Display the mode line if there is one. */ | 31431 | /* Display the mode line if there is one. */ |
| 31332 | if (WINDOW_WANTS_MODELINE_P (w) | 31432 | if (window_wants_mode_line (w) |
| 31333 | && (row = MATRIX_MODE_LINE_ROW (w->current_matrix), | 31433 | && (row = MATRIX_MODE_LINE_ROW (w->current_matrix), |
| 31334 | row->enabled_p) | 31434 | row->enabled_p) |
| 31335 | && row->y < r_bottom) | 31435 | && row->y < r_bottom) |