all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: "ignore Y" in make_lispy_event
Date: Fri, 26 Nov 2010 15:43:40 +0200	[thread overview]
Message-ID: <83bp5c6vzn.fsf@gnu.org> (raw)

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.  */




             reply	other threads:[~2010-11-26 13:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26 13:43 Eli Zaretskii [this message]
2010-11-26 15:47 ` "ignore Y" in make_lispy_event Chong Yidong
2010-11-26 16:11   ` Eli Zaretskii
2010-11-26 18:17     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bp5c6vzn.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.