comparison src/window.c @ 56542:6d2d9477f39e

(coordinates_in_window): Return ON_SCROLL_BAR instead of ON_VERTICAL_BORDER, when on scroll bar. (Fcoordinates_in_window_p): Handle ON_SCROLL_BAR--return nil.
author Richard M. Stallman <rms@gnu.org>
date Sun, 25 Jul 2004 17:43:57 +0000
parents b1738412da70
children f2ea7576ac6e 4e92102a0172 c08afac24467
comparison
equal deleted inserted replaced
56541:919c8adb1702 56542:6d2d9477f39e
577 of the window, and 577 of the window, and
578 return ON_TEXT; 578 return ON_TEXT;
579 if it is on the window's modeline, return ON_MODE_LINE; 579 if it is on the window's modeline, return ON_MODE_LINE;
580 if it is on the border between the window and its right sibling, 580 if it is on the border between the window and its right sibling,
581 return ON_VERTICAL_BORDER. 581 return ON_VERTICAL_BORDER.
582 if it is on a scroll bar,
583 return ON_SCROLL_BAR.
582 if it is on the window's top line, return ON_HEADER_LINE; 584 if it is on the window's top line, return ON_HEADER_LINE;
583 if it is in left or right fringe of the window, 585 if it is in left or right fringe of the window,
584 return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y 586 return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y
585 to window-relative coordinates; 587 to window-relative coordinates;
586 if it is in the marginal area to the left/right of the window, 588 if it is in the marginal area to the left/right of the window,
671 goto header_vertical_border_check; 673 goto header_vertical_border_check;
672 } 674 }
673 675
674 /* Outside any interesting column? */ 676 /* Outside any interesting column? */
675 if (*x < left_x || *x > right_x) 677 if (*x < left_x || *x > right_x)
676 return ON_VERTICAL_BORDER; 678 return ON_SCROLL_BAR;
677 679
678 lmargin_width = window_box_width (w, LEFT_MARGIN_AREA); 680 lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
679 rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA); 681 rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);
680 682
681 text_left = window_box_left (w, TEXT_AREA); 683 text_left = window_box_left (w, TEXT_AREA);
815 case ON_LEFT_MARGIN: 817 case ON_LEFT_MARGIN:
816 return Qleft_margin; 818 return Qleft_margin;
817 819
818 case ON_RIGHT_MARGIN: 820 case ON_RIGHT_MARGIN:
819 return Qright_margin; 821 return Qright_margin;
822
823 case ON_SCROLL_BAR:
824 /* Historically we are supposed to return nil in this case. */
825 return Qnil;
820 826
821 default: 827 default:
822 abort (); 828 abort ();
823 } 829 }
824 } 830 }