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: Thu, 15 Dec 2005 11:28:15 +0200 Organization: JURTA Message-ID: <87k6e6myqw.fsf@jurta.org> References: <4390611E.3040500@swipnet.se> <4391A9CE.6090706@swipnet.se> <87acffdnrg.fsf@jurta.org> <439D501F.8060609@swipnet.se> <87pso1bdrb.fsf@jurta.org> <43A08825.8070704@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134654215 12416 80.91.229.2 (15 Dec 2005 13:43:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 13:43:35 +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 Thu Dec 15 14:43:28 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmtLs-0000ZM-PW for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 14:40:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmtMV-0000sr-Bv for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 08:41:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EmrXe-0004lF-Nf for emacs-devel@gnu.org; Thu, 15 Dec 2005 06:44:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EmrVm-0004Df-7f for emacs-devel@gnu.org; Thu, 15 Dec 2005 06:43:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmqqE-0000ST-TQ for emacs-devel@gnu.org; Thu, 15 Dec 2005 06:00:12 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EmqsG-0007ju-DO; Thu, 15 Dec 2005 06:02:13 -0500 Original-Received: from mail.neti.ee (80-235-34-32-dsl.mus.estpak.ee [80.235.34.32]) by Relayhost1.neti.ee (Postfix) with ESMTP id 9398A20D9; Thu, 15 Dec 2005 12:59:23 +0200 (EET) Original-To: Jan =?iso-8859-1?Q?Dj=E4rv?= In-Reply-To: <43A08825.8070704@swipnet.se> (Jan =?iso-8859-1?Q?Dj=E4rv's?= message of "Wed, 14 Dec 2005 22:01:25 +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 Xref: news.gmane.org gmane.emacs.devel:47785 Archived-At: >> 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). > > That seems to complicated. I just fixed so negative offsets is handeled OK. OK. BTW, I think current docstrings are not clear. I propose to change them as below: Index: lisp/tooltip.el =================================================================== RCS file: /sources/emacs/emacs/lisp/tooltip.el,v retrieving revision 1.70 diff -c -r1.70 tooltip.el *** lisp/tooltip.el 12 Dec 2005 09:36:22 -0000 1.70 --- lisp/tooltip.el 15 Dec 2005 09:27:14 -0000 *************** *** 96,104 **** (defcustom tooltip-x-offset 5 "X offset, in pixels, for the display of tooltips. ! The offset is relative to the position of the mouse. It must ! be chosen so that the tooltip window doesn't contain the mouse ! when it pops up. If `tooltip-frame-parameters' includes the `left' parameter, the value of `tooltip-x-offset' is ignored." --- 98,106 ---- (defcustom tooltip-x-offset 5 "X offset, in pixels, for the display of tooltips. ! The offset is the distance between the X position of the mouse and ! the left border of the tooltip frame. It must be chosen so that the ! tooltip window doesn't contain the mouse when it pops up. If `tooltip-frame-parameters' includes the `left' parameter, the value of `tooltip-x-offset' is ignored." *************** *** 108,116 **** (defcustom tooltip-y-offset +20 "Y offset, in pixels, for the display of tooltips. ! The offset is relative to the position of the mouse. It must ! be chosen so that the tooltip window doesn't contain the mouse ! when it pops up. If `tooltip-frame-parameters' includes the `top' parameter, the value of `tooltip-y-offset' is ignored." --- 110,118 ---- (defcustom tooltip-y-offset +20 "Y offset, in pixels, for the display of tooltips. ! The offset is the distance between the Y position of the mouse and ! the top border of the tooltip frame. It must be chosen so that the ! tooltip window doesn't contain the mouse when it pops up. If `tooltip-frame-parameters' includes the `top' parameter, the value of `tooltip-y-offset' is ignored." -- Juri Linkov http://www.jurta.org/emacs/