[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "ignore Y" in make_lispy_event
From: |
Chong Yidong |
Subject: |
Re: "ignore Y" in make_lispy_event |
Date: |
Fri, 26 Nov 2010 10:47:12 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
> A comment in keyboard.c:make_lispy_event says:
>
> /* For mode line and header line clicks, return X relative to
> the left window edge; ignore Y. Use mode_line_string to look
> for a string on the click position. */
>
> The code below that, introduced in revno 102413, indeed "ignores Y",
> in that it leaves yret at its initial zero value. This breaks mouse
> clicks on the mode line that pop up menus via x-popup-menu: the menu
> is popped at the top of the frame/window, instead of at the place of
> the click.
>
> Chong, did you have good reasons to "ignore Y"? If not, the simple
> patch below restores the correct behavior of the popup menus:
I was working using the Elisp manual as a spec:
X, Y
These are the pixel coordinates of the click, relative to the
top left corner of WINDOW, which is `(0 . 0)'. For the mode
or header line, Y does not have meaningful data. For the
vertical line, X does not have meaningful data.
If there is existing code that relies on undocumented behavior, then we
should indeed restore the old behavior, and document it in the manual.