bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#26905: 25.2: MacOS: tooltips show in wrong display


From: Alan Third
Subject: bug#26905: 25.2: MacOS: tooltips show in wrong display
Date: Sat, 13 May 2017 16:28:21 +0100
User-agent: Mutt/1.7.2 (2016-11-26)

On Sat, May 13, 2017 at 11:02:04AM +0200, Charles A. Roelli wrote:
> I notice now, though, that the tooltip can end up partially offscreen, both
> with and without the above change (e.g. when you create a tooltip with the
> mouse pointer at the right edge of the primary monitor).  IIRC on GNU/Linux
> the tooltip is adjusted to fit on screen.  Maybe this adjustment works on
> newer versions of OS X?

I was thinking about this earlier and I suspect that if we want to
avoid tooltips crossing monitors we’ll have to step through each
screen in [NSScreen screens], check if `pt` is within it’s bounds, and
when we find the right screen, use it’s origin and frame to calculate
the min/max x/y.

constrain_frame_rect in nsterm.m does something similar already.

There’s a method in CGRect called CGRectContainsPoint, which should
help us here, as NSRect is really just a CGRect. Unfortunately it
doesn’t appear to be available in GNUstep, so it may be necessary to
implement the check ourselves.

If we don’t care about spanning monitors, I think we still need to
step through each screen and calculate the overall min/max values.

What do you think?
-- 
Alan Third





reply via email to

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