From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: "ignore Y" in make_lispy_event Date: Fri, 26 Nov 2010 15:43:40 +0200 Message-ID: <83bp5c6vzn.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1290779051 10620 80.91.229.12 (26 Nov 2010 13:44:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 26 Nov 2010 13:44:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 26 14:44:07 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 1PLyas-0002Pm-KI for ged-emacs-devel@m.gmane.org; Fri, 26 Nov 2010 14:44:06 +0100 Original-Received: from localhost ([127.0.0.1]:57052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLyas-0006OX-5O for ged-emacs-devel@m.gmane.org; Fri, 26 Nov 2010 08:44:06 -0500 Original-Received: from [140.186.70.92] (port=37138 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLyYp-0005TL-Cd for emacs-devel@gnu.org; Fri, 26 Nov 2010 08:42:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLyYo-0001VZ-59 for emacs-devel@gnu.org; Fri, 26 Nov 2010 08:41:59 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:56906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLyYn-0001V5-SG for emacs-devel@gnu.org; Fri, 26 Nov 2010 08:41:58 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LCH00J00V7NKC00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Fri, 26 Nov 2010 15:41:33 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.63.39]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LCH00J3MVD8K510@a-mtaout21.012.net.il>; Fri, 26 Nov 2010 15:41:33 +0200 (IST) X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:133164 Archived-At: 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: === modified file 'src/keyboard.c' --- src/keyboard.c 2010-11-20 14:51:25 +0000 +++ src/keyboard.c 2010-11-26 13:33:31 +0000 @@ -5305,6 +5305,7 @@ make_lispy_position (struct frame *f, Li ? PT : XMARKER (w->pointm)->charpos; xret = wx; + yret = wy; } /* For fringes and margins, Y is relative to the area's (and the window's) top edge, while X is meaningless. */