all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: "Charles A. Roelli" <charles@aurox.ch>
Cc: 26816@debbugs.gnu.org
Subject: bug#26816: mouse movement support for OS X
Date: Thu, 11 May 2017 22:43:42 +0100	[thread overview]
Message-ID: <20170511214342.GA10431@breton.holly.idiocy.org> (raw)
In-Reply-To: <e4bb7794-a006-aa6d-235c-fcc9a03bb32d@aurox.ch>

On Thu, May 11, 2017 at 08:06:13PM +0200, Charles A. Roelli wrote:
> > Presumably (frame-position) returns nonsensical values on your
> > portrait monitor, and (set-frame-position nil 0 0) also plants the
> > frame in the wrong place (ie. not the top left)?
> 
> (set-frame-position nil 0 0) places the frame in the top-left corner of the
> primary monitor for me in Emacs 25.2.  (frame-position) with the frame in
> the top-left corner of the secondary monitor reports (-1050 . -880).
> 
> I'm not sure: is this expected behavior?

It’s what I’d expect with the below modification to
NS_PARENT_WINDOW_TOP_POS, so if Emacs 25 does that too then I’m happy.

I was thinking that without the modification, Emacs 26 would do
strange things, just like it did with positioning the mouse pointer.

> I made the line say [[[NSScreen screens] objectAtIndex: 0]
> frame].size.height (equivalent to what you wrote) and the mouse can
> now be set to a position in the frame as expected. Thanks for your
> help with this.

Thank you for working on it. Besides, I introduced this particular
bug.

> 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.
-- 
Alan Third





  reply	other threads:[~2017-05-11 21:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-07 15:11 bug#26816: mouse movement support for OS X Charles A. Roelli
2017-05-07 16:51 ` Eli Zaretskii
2017-05-08 18:34   ` Charles A. Roelli
2017-05-08 18:54     ` Eli Zaretskii
2017-05-07 18:07 ` martin rudalics
2017-05-07 20:00 ` Alan Third
2017-05-09 19:09   ` Charles A. Roelli
2017-05-09 22:44     ` Alan Third
2017-05-11 18:06       ` Charles A. Roelli
2017-05-11 21:43         ` Alan Third [this message]
2017-05-14 13:29           ` Charles A. Roelli
2017-05-14 13:59             ` Alan Third
2017-05-14 14:37               ` Eli Zaretskii
2017-05-15 18:23                 ` Charles A. Roelli
2017-05-16 22:53                   ` Alan Third
2017-05-17  8:36                     ` Andreas Schwab
2017-05-18 19:43                       ` Charles A. Roelli

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=20170511214342.GA10431@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=26816@debbugs.gnu.org \
    --cc=charles@aurox.ch \
    /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.