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: Wed, 14 Dec 2005 09:54:34 +0200 Organization: JURTA Message-ID: <87pso1bdrb.fsf@jurta.org> References: <4390611E.3040500@swipnet.se> <4391A9CE.6090706@swipnet.se> <87acffdnrg.fsf@jurta.org> <439D501F.8060609@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134557608 4603 80.91.229.2 (14 Dec 2005 10:53:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2005 10:53:28 +0000 (UTC) Cc: eliz@gnu.org, czkmt@remus.dti.ne.jp, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 14 11:53:27 2005 Return-path: Original-Received: from [199.232.75.2] (helo=lists.gnu.org) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmUFM-0002JW-La for ged-emacs-devel@m.gmane.org; Wed, 14 Dec 2005 11:52:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmU89-0002Zq-OK for ged-emacs-devel@m.gmane.org; Wed, 14 Dec 2005 05:45:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EmS0r-0006DW-Te for emacs-devel@gnu.org; Wed, 14 Dec 2005 03:29:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EmS0i-00069m-9w for emacs-devel@gnu.org; Wed, 14 Dec 2005 03:29:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmS0e-000677-V5 for emacs-devel@gnu.org; Wed, 14 Dec 2005 03:29:13 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EmS2f-00024F-Fe; Wed, 14 Dec 2005 03:31:17 -0500 Original-Received: from mail.neti.ee (80-235-33-164-dsl.mus.estpak.ee [80.235.33.164]) by Relayhost1.neti.ee (Postfix) with ESMTP id DE0621C93; Wed, 14 Dec 2005 10:28:46 +0200 (EET) Original-To: "Jan D." In-Reply-To: <439D501F.8060609@swipnet.se> (Jan D.'s message of "Mon, 12 Dec 2005 11:25:35 +0100") 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 X-Broken-Reverse-DNS: no host name found for IP address 199.232.75.2 Xref: news.gmane.org gmane.emacs.devel:47683 Archived-At: > It must be a bug that the tooltip can be covered by the pointer so > I've changed it as you suggested (for W32 and Mac also this time). > You must have quite a big font to see this with the default y offset. > I also changed the default y offset to 20 from 40. Thanks. Now due to your changes I discovered an old bug (I can reproduce it in Emacs 21.4) in X coordinate calculations (and now this bug also affects Y coordinate calculations). After setting the X offset (or the Y offset) to a negative value, tooltips can appear partly outside the left (or top) edge of the screen. I'm sorry, I didn't report this bug earlier, because I found it only now, after your changes while trying to use negative offsets. One idea that came to me is that negative offsets could be interpreted as absolute distances between the X (Y) position of the mouse and the right (bottom) border of the tooltip frame (and to leave positive offsets relative to the left (top) border as they work now). This way no matter what values offsets will have, the tooltip frame will never cover the mouse pointer. And this will work exactly the same way as currently calculations behave to avoid the tooltip displayed outside the screen (i.e. negating the interpretation of offsets to opposite sides of the tooltip frame). -- Juri Linkov http://www.jurta.org/emacs/