emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"ignore Y" in make_lispy_event


From: Eli Zaretskii
Subject: "ignore Y" in make_lispy_event
Date: Fri, 26 Nov 2010 15:43:40 +0200

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 via email to

[Prev in Thread] Current Thread [Next in Thread]