changeset 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 c9aeaeb38318
children 1cdd958738b8
files src/window.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Sun Nov 23 00:09:39 2003 +0000
+++ b/src/window.c	Sun Nov 23 00:10:08 2003 +0000
@@ -632,8 +632,7 @@
      scroll bars.  */
 
   if (WINDOW_WANTS_MODELINE_P (w)
-      && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w)
-      && *y < bottom_y)
+      && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w))
     {
       part = ON_MODE_LINE;
 
@@ -662,7 +661,6 @@
     }
 
   if (WINDOW_WANTS_HEADER_LINE_P (w)
-      && *y >= top_y
       && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w))
     {
       part = ON_HEADER_LINE;
@@ -708,7 +706,7 @@
 	      ? (*x >= left_x + WINDOW_LEFT_FRINGE_WIDTH (w))
 	      : (*x < left_x + lmargin_width)))
 	{
-	  *x -= x0;
+	  *x -= left_x;
 	  if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
 	    *x -= WINDOW_LEFT_FRINGE_WIDTH (w);
 	  *y -= top_y;