GNU bug report logs - #1372
posn-at-x-y reports wrong window

Previous Next

Package: emacs;

Reported by: David Reitter <david.reitter <at> gmail.com>

Date: Wed, 19 Nov 2008 00:55:04 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 1372 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: David Reitter <david.reitter <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 1372 <at> debbugs.gnu.org, Jin Choi <jsc <at> alum.mit.edu>
Subject: Re: bug#1372: posn-at-x-y reports wrong window
Date: Wed, 19 Nov 2008 10:27:15 -0500
[Message part 1 (text/plain, inline)]
Thanks, this patch fixes the problem.

- David

On 19 Nov 2008, at 10:09, martin rudalics wrote:

> > (fringe-mode 0)
> > C-x 3 C-x 2 C-x o C-x o
> > (we're now in the large window on the right, with two small  
> windows in
> > the left half of the frame).
> >
> > Insert enough newlines to be vertically just above the horizontal
> > divider on the left.
> >
> > M-: (posn-at-x-y 0 (cdr (posn-x-y (posn-at-point)))) RET
> >
> > Insert newline, now we're next to the divider line.
> >
> > M-: (posn-at-x-y 0 (cdr (posn-x-y (posn-at-point)))) RET
> >
> > --> wrong window (the window in the upper left) is given in the  
> structure.
> > Instead of 0, the x value can be up to 6 ((frame-char-width)  
> reports 7).
>
> Can you try the attached patch?
>
> martin
> *** window.c.~1.634.~	2008-11-18 18:56:23.703125000 +0100
> --- window.c	2008-11-19 16:04:02.078125000 +0100
> ***************
> *** 774,780 ****
>  	}
>        else
>  	{
> ! 	  if (eabs (*x - x1) < grabbable_width)
>  	    {
>  	      /* Convert X and Y to window relative coordinates.
>  		 Vertical border is at the right edge of window.  */
> --- 774,781 ----
>  	}
>        else
>  	{
> ! 	  if ((WINDOW_RIGHTMOST_P (w) || *x < x1)
> ! 	      && eabs (*x - x1) < grabbable_width)
>  	    {
>  	      /* Convert X and Y to window relative coordinates.
>  		 Vertical border is at the right edge of window.  */

[smime.p7s (application/pkcs7-signature, attachment)]

This bug report was last modified 16 years and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.