From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: "ignore Y" in make_lispy_event Date: Fri, 26 Nov 2010 10:47:12 -0500 Message-ID: <87d3psw0hr.fsf@stupidchicken.com> References: <83bp5c6vzn.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1290787536 20733 80.91.229.12 (26 Nov 2010 16:05:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 26 Nov 2010 16:05:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 26 17:05:31 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PM0nj-00040d-5E for ged-emacs-devel@m.gmane.org; Fri, 26 Nov 2010 17:05:31 +0100 Original-Received: from localhost ([127.0.0.1]:48029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PM0nd-0004EG-97 for ged-emacs-devel@m.gmane.org; Fri, 26 Nov 2010 11:05:25 -0500 Original-Received: from [140.186.70.92] (port=57810 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PM0XO-000750-M2 for emacs-devel@gnu.org; Fri, 26 Nov 2010 10:49:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PM0W7-0000bv-AR for emacs-devel@gnu.org; Fri, 26 Nov 2010 10:48:32 -0500 Original-Received: from pantheon-po26.its.yale.edu ([130.132.50.121]:44911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PM0W7-0000aO-7g; Fri, 26 Nov 2010 10:47:19 -0500 Original-Received: from furball (173-9-57-109-NewEngland.hfc.comcastbusiness.net [173.9.57.109]) (authenticated bits=0) by pantheon-po26.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id oAQFlHpJ012789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 26 Nov 2010 10:47:17 -0500 Original-Received: by furball (Postfix, from userid 1000) id 03FD4160946; Fri, 26 Nov 2010 10:47:12 -0500 (EST) In-Reply-To: <83bp5c6vzn.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Nov 2010 15:43:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133171 Archived-At: Eli Zaretskii 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.