GNU bug report logs -
#26905
25.2: MacOS: tooltips show in wrong display
Previous Next
Reported by: "Charles A. Roelli" <charles <at> aurox.ch>
Date: Sat, 13 May 2017 07:44:02 UTC
Severity: normal
Found in version 25.2
Done: Alan Third <alan <at> idiocy.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 8 years and 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.