From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: tooltip can be displayed outside the screen Date: Fri, 02 Dec 2005 23:04:57 +0200 Organization: JURTA Message-ID: <87oe3zut2t.fsf@jurta.org> References: <4390611E.3040500@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133557810 29875 80.91.229.2 (2 Dec 2005 21:10:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Dec 2005 21:10:10 +0000 (UTC) Cc: jan.h.d@swipnet.se, czkmt@remus.dti.ne.jp, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 02 22:09:59 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EiI6k-0005ZR-VE for ged-emacs-devel@m.gmane.org; Fri, 02 Dec 2005 22:06:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EiI6k-00060b-LN for ged-emacs-devel@m.gmane.org; Fri, 02 Dec 2005 16:06:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EiI5y-0005Os-Gn for emacs-devel@gnu.org; Fri, 02 Dec 2005 16:05:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EiI5x-0005Nk-Fl for emacs-devel@gnu.org; Fri, 02 Dec 2005 16:05:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EiI5x-0005N6-3W for emacs-devel@gnu.org; Fri, 02 Dec 2005 16:05:29 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EiI5n-0008PU-2a; Fri, 02 Dec 2005 16:05:19 -0500 Original-Received: from mail.neti.ee (80-235-34-133-dsl.mus.estpak.ee [80.235.34.133]) by Relayhost1.neti.ee (Postfix) with ESMTP id B95261A69; Fri, 2 Dec 2005 23:05:28 +0200 (EET) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Fri, 02 Dec 2005 20:33:54 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46903 Archived-At: >> > 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 http://www.jurta.org/emacs/