GNU bug report logs - #26816
mouse movement support for OS X

Previous Next

Package: emacs;

Reported by: "Charles A. Roelli" <charles <at> aurox.ch>

Date: Sun, 7 May 2017 15:13:01 UTC

Severity: normal

Tags: fixed

Fixed in version 26.1

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: "Charles A. Roelli" <charles <at> aurox.ch>
To: Alan Third <alan <at> idiocy.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 26816 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#26816: mouse movement support for OS X
Date: Sun, 14 May 2017 15:29:57 +0200
[Message part 1 (text/plain, inline)]
Attached is a patch now working with multiple monitors.  I also added 
`ns-set-mouse-absolute-pixel-position', a test and a NEWS entry.  The 
test works interactively, but it requires a frame to run and I'm not 
sure whether tests run with them by default.

The code for handling the y-coord in 
`ns-set-mouse-absolute-pixel-position' is from 
`ns-display-monitor-attributes-list' (in the calculation of the screen 
geometry).  I also made (set-mouse-absolute-pixel-position 0 0) put the 
mouse in the top-left corner of the current screen.

I tried out both `set-mouse-position' and 
`set-mouse-absolute-pixel-position' on setups with the secondary monitor 
on the left, right, top and bottom, and they seem to work right.

I also got rid of the call to `ns_raise_frame' in 
`frame_set_mouse_pixel_position', which is unnecessary.

>> This now reminds me of a related problem, though: with Emacs 25.2 (or in
>> Emacs 26, with the above change applied to NS_PARENT_WINDOW_TOP_POS(f)),
>> tooltips originating from an area with a help-echo property (like "Lisp
>> Interaction" in the mode line in emacs -Q) in a frame on the secondary
>> monitor actually show up in the primary monitor instead -- as if the tooltip
>> frame is constrained to having a positive x-coordinate only.  I haven't
>> found where it happens, but I guess the cause is similar.
> Look at compute_tip_xy in nsfns.m. It moves tooltips into the positive
> screen space. I’ve not managed to get to grips with this code yet.
>
> I think what we want is for it to try to keep the tooltip on one
> screen, so it’s not spanning two monitors, but allow it to go into
> negative space.
>
> Perhaps this should be a separate bug report.

Done (#26905).
[0001-mouse-movement-macos.patch (text/x-patch, attachment)]

This bug report was last modified 8 years and 53 days ago.

Previous Next


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