From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19925: 25.0.50; mouseover menu items takes up to 30sec to show the proper tooltip or message Date: Mon, 23 Feb 2015 20:07:58 +0200 Message-ID: <83wq387b7l.fsf@gnu.org> References: <1d10f417-acb4-4b32-8bc3-fe949388330d@default> <837fv98faf.fsf@gnu.org> <2D412C8E-DB77-4E4B-AED9-A9D056439B3D@swipnet.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1424714914 26377 80.91.229.3 (23 Feb 2015 18:08:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Feb 2015 18:08:34 +0000 (UTC) Cc: 19925@debbugs.gnu.org To: "Jan D." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 23 19:08:19 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YPxQW-0004un-Fu for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Feb 2015 19:08:16 +0100 Original-Received: from localhost ([::1]:44860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPxQV-0002km-U7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Feb 2015 13:08:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPxQN-0002jl-MC for bug-gnu-emacs@gnu.org; Mon, 23 Feb 2015 13:08:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPxQJ-00036m-0t for bug-gnu-emacs@gnu.org; Mon, 23 Feb 2015 13:08:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPxQI-00036e-Td for bug-gnu-emacs@gnu.org; Mon, 23 Feb 2015 13:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YPxQH-0003N9-Ql for bug-gnu-emacs@gnu.org; Mon, 23 Feb 2015 13:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Feb 2015 18:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19925 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19925-submit@debbugs.gnu.org id=B19925.142471488112957 (code B ref 19925); Mon, 23 Feb 2015 18:08:01 +0000 Original-Received: (at 19925) by debbugs.gnu.org; 23 Feb 2015 18:08:01 +0000 Original-Received: from localhost ([127.0.0.1]:55777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YPxQG-0003Mu-Gv for submit@debbugs.gnu.org; Mon, 23 Feb 2015 13:08:00 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:40808) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YPxQE-0003Mg-40 for 19925@debbugs.gnu.org; Mon, 23 Feb 2015 13:07:59 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NK800M00KQGZ100@a-mtaout23.012.net.il> for 19925@debbugs.gnu.org; Mon, 23 Feb 2015 20:07:51 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NK800MAOL13YX10@a-mtaout23.012.net.il>; Mon, 23 Feb 2015 20:07:51 +0200 (IST) In-reply-to: <2D412C8E-DB77-4E4B-AED9-A9D056439B3D@swipnet.se> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99736 Archived-At: > From: "Jan D." > Date: Mon, 23 Feb 2015 06:17:30 +0100 > Cc: Drew Adams , > 19925@debbugs.gnu.org > > It sounds strange to tie tooltips to the blink cursor. They aren't. The problem is that tooltips pop up when help-echo events are processed by the Emacs code that reads the event queue. When a menu is active on w32, nothing triggers the queue-processing code for many seconds, and so these help-echo events are not seen until then, by which time a typical user will lose patience. The timer which blinks the cursor triggers that processing more frequently as a side effect, and works around the problem. > This is how it is done for X and NS: > > On mousover, check if tooltip timer has been started, if not start it. > If mouse moves outside area for tooltip, cancel timer, or if it moves into > another area, cancel timer and start a new one. > When timer fires, inject an event to show tooltip. > > Is this not how it is done on w32? Yes, it's done exactly the same way on w32 (the code in tooltip.el is system-agnostic). But what you describe is just the end of the tooltip display saga. The beginning of the saga is when the (terminal-specific) menu support code inserts a help-echo event into the queue, which is then read from the queue, and causes Emacs to call tooltip-show-help (via the show-help-function variable). Next, tooltip-show-help puts the help string into the tooltip-help-message variable, and then starts the tooltip timer you mentioned, which, when expired, actually causes the tooltip to be displayed. So if the help-echo event is not read from the event queue, none of the above will happen. (I did verify that the help-echo events are put into the event queue on w32.) Having blink-cursor events come in frequently causes the event queue to be read and the help-echo events be processed, which makes the reaction time to mouse movements over menus much faster. I might try to find time to look deeper into this, but my knowledge of the Windows GUI programming is very scarce, so don't hold your breath. People who have time and/or know more than I do about Windows GUI programing are welcome to investigate and try solving this, or suggest solutions they know will work.