comparison src/window.c @ 53129:070325c3884d

(coordinates_in_window): Remove redundant tests. Fix returned X pixel value for left-margin.
author Kim F. Storm <storm@cua.dk>
date Sun, 23 Nov 2003 00:10:08 +0000
parents 91a9da753e30
children 49489d2151bf
comparison
equal deleted inserted replaced
53128:c9aeaeb38318 53129:070325c3884d
630 sibling, say it's on the vertical line. That's to be able 630 sibling, say it's on the vertical line. That's to be able
631 to resize windows horizontally in case we're using toolkit 631 to resize windows horizontally in case we're using toolkit
632 scroll bars. */ 632 scroll bars. */
633 633
634 if (WINDOW_WANTS_MODELINE_P (w) 634 if (WINDOW_WANTS_MODELINE_P (w)
635 && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w) 635 && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w))
636 && *y < bottom_y)
637 { 636 {
638 part = ON_MODE_LINE; 637 part = ON_MODE_LINE;
639 638
640 header_vertical_border_check: 639 header_vertical_border_check:
641 /* We're somewhere on the mode line. We consider the place 640 /* We're somewhere on the mode line. We consider the place
660 *y -= top_y; 659 *y -= top_y;
661 return part; 660 return part;
662 } 661 }
663 662
664 if (WINDOW_WANTS_HEADER_LINE_P (w) 663 if (WINDOW_WANTS_HEADER_LINE_P (w)
665 && *y >= top_y
666 && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w)) 664 && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w))
667 { 665 {
668 part = ON_HEADER_LINE; 666 part = ON_HEADER_LINE;
669 goto header_vertical_border_check; 667 goto header_vertical_border_check;
670 } 668 }
706 if (lmargin_width > 0 704 if (lmargin_width > 0
707 && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) 705 && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
708 ? (*x >= left_x + WINDOW_LEFT_FRINGE_WIDTH (w)) 706 ? (*x >= left_x + WINDOW_LEFT_FRINGE_WIDTH (w))
709 : (*x < left_x + lmargin_width))) 707 : (*x < left_x + lmargin_width)))
710 { 708 {
711 *x -= x0; 709 *x -= left_x;
712 if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)) 710 if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
713 *x -= WINDOW_LEFT_FRINGE_WIDTH (w); 711 *x -= WINDOW_LEFT_FRINGE_WIDTH (w);
714 *y -= top_y; 712 *y -= top_y;
715 return ON_LEFT_MARGIN; 713 return ON_LEFT_MARGIN;
716 } 714 }