🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98906

x-windows coordinates-in-window-p is broken...

#98906
From: Nick Caruso
Date: Wed, 30 Jan 1991 22:46
63 lines
2784 bytes
In GNU Emacs 18.55.1 of Fri Oct 26 1990 on beast (berkeley-unix)

	if you apply coordinates-in-window-p to a set of coordinates
in the message area and a window on a minibuffer there, it returns nil
instead of the list of positions it should return.

the c code in x11fns.c says:

     DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p,
       Scoordinates_in_window_p, 2, 2, 0,
       "Return non-nil if POSITIONS (a list, (SCREEN-X SCREEN-Y)) is in WINDOW.\n\
     Returned value is list of positions expressed\n\
     relative to window upper left corner.")
       (coordinate, window)
	  register Lisp_Object coordinate, window;
     {
	     register Lisp_Object xcoord, ycoord;

	     if (!CONSP (coordinate))
		     wrong_type_argument (Qlistp, coordinate);

	     CHECK_WINDOW (window, 2);
	     xcoord = Fcar (coordinate);
	     ycoord = Fcar (Fcdr (coordinate));
	     CHECK_NUMBER (xcoord, 0);
	     CHECK_NUMBER (ycoord, 1);
	     if ((XINT (xcoord) < XINT (XWINDOW (window)->left)) ||
		 (XINT (xcoord) >= (XINT (XWINDOW (window)->left) +
				    XINT (XWINDOW (window)->width))))
		     return Qnil;

	     XFASTINT (xcoord) -= XFASTINT (XWINDOW (window)->left);
	     if (XINT (ycoord) == (screen_height - 1))
		     return Qnil;

 		    ^^^^ 
I suspect that this |||| is the offending statement, since my
screen-height was 46, and the POSITIONS parameter to
coordinates-in-window-p was '(4 45)...  my question is, what is the
purpose of this?  is it just a brain-o or is there some hidden
purpose?


	     if ((XINT (ycoord) < XINT (XWINDOW (window)->top)) ||
		 (XINT (ycoord) >= (XINT (XWINDOW (window)->top) +
				    XINT (XWINDOW (window)->height)) - 1))
		     return Qnil;

	     XFASTINT (ycoord) -= XFASTINT (XWINDOW (window)->top);
	     return Fcons (xcoord, Fcons (ycoord, Qnil));
     }


I often times leave a minibuffer hanging around and expect to be able to mouse into the window only
to be hosed time and again.   This is quite annoying.  

  many thanks,

--
nick caruso			
icad inc, 201 broadway
peoples republic of cambridge, MA 02139-1901
internet: nick@icad.com / UUCP: ...uunet!icad.com!nick
Technical Details
Message-ID: <9101302246.AA05721@beast.icad.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!icad.com!nick

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,63633eff6c8c1586,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-01-30 14:46:54 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!icad.com!nick
From: nick@icad.com (Nick Caruso)
Newsgroups: gnu.emacs.bug
Subject: x-windows coordinates-in-window-p is broken...
Message-ID: <9101302246.AA05721@beast.icad.com>
Date: 30 Jan 91 22:46:54 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 63
Approved: bug-gnu-emacs@prep.ai.mit.edu