GNU bug report logs - #27053
26.0.50; x-show-tip gets wrong mouse position if frame moves w/o mouse moving on macOS

Previous Next

Package: emacs;

Reported by: Aaron Jensen <aaronjensen <at> gmail.com>

Date: Wed, 24 May 2017 12:33:02 UTC

Severity: normal

Found in version 26.0.50

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Aaron Jensen <aaronjensen <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 27053 <at> debbugs.gnu.org
Subject: bug#27053: 26.0.50; x-show-tip gets wrong mouse position if frame moves w/o mouse moving on macOS
Date: Wed, 24 May 2017 07:57:10 -0700
On Wed, May 24, 2017 at 7:42 AM, Aaron Jensen <aaronjensen <at> gmail.com> wrote:
> It's as if emacs updates the mouse position only on mouse move and
> stores it in frame local coordinates on macOS.

Indeed, this appears to be exactly what it is doing (from nsterm.m):

-(void)mouseMoved: (NSEvent *)e
{
  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (emacsframe);
  struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe);
  Lisp_Object frame;
  NSPoint pt;

  NSTRACE_WHEN (NSTRACE_GROUP_EVENTS, "[EmacsView mouseMoved:]");

  dpyinfo->last_mouse_movement_time = EV_TIMESTAMP (e);
  pt = [self convertPoint: [e locationInWindow] fromView: nil];
  dpyinfo->last_mouse_motion_x = pt.x;
  dpyinfo->last_mouse_motion_y = pt.y;

I do not know what the best solution to this is. They could be stored
in screen local coordinates and converted to frame local as they're
needed, or they could be recalculated/asked for whenever the frame is
moved.




This bug report was last modified 8 years and 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.