GNU bug report logs -
#22549
25.0.50; Tooltips placed outside of screen limits
Previous Next
Reported by: ofv <at> wanadoo.es (Óscar Fuentes)
Date: Thu, 4 Feb 2016 04:06:02 UTC
Severity: normal
Found in version 25.0.50
Done: Óscar Fuentes <ofv <at> wanadoo.es>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
martin rudalics <rudalics <at> gmx.at> writes:
> Please try the attached patch. Glenn gave a recipe how to emulate
> multiple monitors with a single one but I'm a bit reluctant to test it.
> My display resolution setup is somewhat fragile.
The first problem with the patch is that it crashes when there is not an
Emacs frame on some of the monitors. This is solved changing the `if'
to:
if (CONSP (frames) && !NILP (XCDR (frames))
&& EQ (frame, XCAR (XCDR (frames))))
{
The next problem is that the condition
EQ (frame, XCAR (XCDR (frames)))
is always false, which makes sense because `frame' is the tooltip frame
(unless I'm misunderstanding what XSETFRAME does) and it is not listed
on `frames'.
For going ahead I "corrected" this with
struct frame *sf = XFRAME (selected_frame);
XSETFRAME (frame, sf);
which is wrong when there is more than one frame, because the tooltip
may be shown for a frame that is not the selected one (showing tooltips
for other than the selected frame seems inappropriate to me, but that's
how Emacs behaves right now).
Then, as the comparision only takes into account the first frame listed
on `frames', even if `frame' where correct (the frame that triggered the
tooltip) it could fail when there is more than one Emacs frame on the
same monitor.
I observed that the tooltip is correctly placed when the right
conditions (see below) are satisfied.
What is missing is to determine the parent frame of the tooltip frame,
instead of using just the selected one as I did, and to search for that
frame on the list of frames associated to the current monitor, instead
of just testing the first frame on the list.
This bug report was last modified 9 years and 112 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.