[Top][All Lists]

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

Re: tooltip can be displayed outside the screen

From: Juri Linkov
Subject: Re: tooltip can be displayed outside the screen
Date: Fri, 02 Dec 2005 23:04:57 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

>> >    Sorry I need to give a little more explanation.  In the two images
>> >    Emacs frame is placed on the bottom edge of the screen.  When I
>> >    move the mouse pointer to the mode line, Emacs 22.0.50 tries to
>> >    place the tooltip below the mouse pointer.  But enough pixels are
>> >    not left between the point just below the mouse pointer and the
>> >    bottom edge of the screen. As a consequence the tooltip appears
>> >    partly off the edge of the screen.
>> >
>> >Can someone please fix this and ack?
>> Fixed.
> Jan fixed this for X only; I now fixed it for w32.  I think someone
> with access to the Mac needs to fix it in macfns.c.

I noticed that the user option `tooltip-y-offset' doesn't do what it is
intended to do.  Instead of specifying the Y offset, it actually specifies
Y offset + height of the tooltip frame.  With a different font size
the tooltip might overlap the mouse pointer (with a bigger font) or might
be placed too far from the mouse pointer (with a smaller font).  This looks
like a bug.

OTOH, `tooltip-x-offset' properly specifies the X offset.  I suggest
to duplicate the implementation of calculating the X absolute coordinate
of the tooltip frame position, for calculating the Y absolute coordinate
with replacing `x' with `y' and `width' with `height' in the copy of the
code.  This will make the logic of these two options exactly the same.

This change will also require fixing the default value of `tooltip-y-offset'
from 40 (which currently is the sum of the real Y offset + the size of
the default font) to e.g. 18.

Juri Linkov

reply via email to

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