unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* "ignore Y" in make_lispy_event
@ 2010-11-26 13:43 Eli Zaretskii
  2010-11-26 15:47 ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2010-11-26 13:43 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-26 18:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 13:43 "ignore Y" in make_lispy_event Eli Zaretskii
2010-11-26 15:47 ` Chong Yidong
2010-11-26 16:11   ` Eli Zaretskii
2010-11-26 18:17     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).