[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix `window-at' and `coordinates-in-window-p'
From: |
Luc Teirlinck |
Subject: |
Re: [PATCH] Fix `window-at' and `coordinates-in-window-p' |
Date: |
Sat, 24 Jul 2004 09:30:52 -0500 (CDT) |
After taking a closer look at your patch, I guess one would have to be
careful that there are no functions calling the functions you changed
that _already_ adjust for FRAME_INTERNAL_BORDER_WIDTH, in which case
they will double-adjust after the patch. I did not find any, but I
have not looked that carefully.
I guess an alternative would be to make the adjustment inside
`window-at' and `coordinates-in-window-p'.
A patch that Richard sent me and that does this for `window-at'
strangely enough seems to fail by making `window-at' return nil
everywhere:
*** window.c 20 Jul 2004 16:52:30 -0400 1.471
--- window.c 23 Jul 2004 20:05:29 -0400
***************
*** 937,944 ****
CHECK_NUMBER_OR_FLOAT (y);
return window_from_coordinates (f,
! FRAME_PIXEL_X_FROM_CANON_X (f, x),
! FRAME_PIXEL_Y_FROM_CANON_Y (f, y),
0, 0, 0, 0);
}
--- 937,946 ----
CHECK_NUMBER_OR_FLOAT (y);
return window_from_coordinates (f,
! (FRAME_PIXEL_X_FROM_CANON_X (f, x)
! + FRAME_INTERNAL_BORDER_WIDTH (f)),
! (FRAME_PIXEL_Y_FROM_CANON_Y (f, y)
! + FRAME_INTERNAL_BORDER_WIDTH (f)),
0, 0, 0, 0);
}
Re: [PATCH] Fix `window-at' and `coordinates-in-window-p', Richard Stallman, 2004/07/24