From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.devel Subject: Re: Tooltip pops up when moving mouse Date: Thu, 17 Mar 2005 21:42:20 +0100 Message-ID: <013301c52b31$de1ab010$0200a8c0@sedrcw11488> References: <002501c52984$826bc550$0200a8c0@sedrcw11488> <001b01c52a28$f7967ba0$0200a8c0@sedrcw11488> <4238A6B5.2060905@swipnet.se> <00f301c52b14$96345700$0200a8c0@sedrcw11488> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1111094194 30444 80.91.229.2 (17 Mar 2005 21:16:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2005 21:16:34 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 17 22:16:33 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DC2Jy-0001N5-P6 for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2005 22:14:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DC2aK-0005Ig-Vd for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2005 16:31:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DC2Zd-00053g-1I for emacs-devel@gnu.org; Thu, 17 Mar 2005 16:30:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DC2Zb-00053L-EK for emacs-devel@gnu.org; Thu, 17 Mar 2005 16:30:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DC2Wv-0004Gj-8J for emacs-devel@gnu.org; Thu, 17 Mar 2005 16:27:45 -0500 Original-Received: from [81.228.10.116] (helo=av1-1-sn4.m-sp.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DC1pA-0000kA-VZ for emacs-devel@gnu.org; Thu, 17 Mar 2005 15:42:33 -0500 Original-Received: by av1-1-sn4.m-sp.skanova.net (Postfix, from userid 502) id 572C937F70; Thu, 17 Mar 2005 21:42:32 +0100 (CET) Original-Received: from smtp2-2-sn4.m-sp.skanova.net (smtp2-2-sn4.m-sp.skanova.net [81.228.10.182]) by av1-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 48AA337E64; Thu, 17 Mar 2005 21:42:32 +0100 (CET) Original-Received: from sedrcw11488 (t3o58p229.telia.com [195.252.56.229]) by smtp2-2-sn4.m-sp.skanova.net (Postfix) with SMTP id 18CD737E58; Thu, 17 Mar 2005 21:42:30 +0100 (CET) Original-To: "Jan D." X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 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-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34680 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34680 ----- Original Message ----- From: "Jan D." > > Thanks. Then I must say I do not understand how this works. As far as > > I see > > for this to work reliably tooltip.el:tooltip-start-delayed-tip must > > record > > the mouse position (because if the mouse has moved when the timer > > fires the > > tooltip should not be shown). However it does not. > > > > Could someone please try to explain this to me? Am I missing something > > here? > > I don't know how it is implemented, but the tooltip for a link in X11 > is not removed if you move the mouse within the link, it is only > removed when you leave the link (i.e. the highlight is removed). So > the enter/leave link code must do something. Yes, that is how it works on w32 too. I meant something a little bit different. I think the timer for the tooltip popup should be canceled (and maybe started again) every time the mouse is moved. Indeed I believe that is what the code does. However this does not work as intended. Sometimes the operation for canceling the timer get queued but it is actually canceled and instead the tooltip flashes by. To prevent this ugly behaviour that occurs on w32 the mouse position where the timer where started must be recorded (I am repeating myself here...). As far as I can see this is not done. It is actually quite simple I believe now: mouse-position should be called in tooltip.el: tooltip-start-delayed-tip and then again in tooltip-timeout again. It the mouse position has changed then tooltip-timeout should not run tooltip-hook. This should fix the problem with the flashing tooltip. I will test and come back...