From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.devel Subject: Re: Tooltips on w32 slow and strange Date: Tue, 15 Feb 2005 14:43:20 +0100 Message-ID: <01d301c51364$92cddef0$0200a8c0@sedrcw11488> References: <016b01c51163$45e1d630$0200a8c0@sedrcw11488> <16186.217.194.34.123.1108368907.squirrel@wwws.franken.de> <4210762C.9030203@gnu.org> <003a01c5129c$c2c55e80$0200a8c0@sedrcw11488> <01c512d3$Blat.v2.4$ddc805c0@zahav.net.il> <01c51319$Blat.v2.4$54fb6980@zahav.net.il> <34459.217.194.34.123.1108457620.squirrel@wwws.franken.de> <4211C8BD.2000206@gnu.org> <4051.217.194.34.123.1108462308.squirrel@wwws.franken.de> 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 1108475543 12282 80.91.229.2 (15 Feb 2005 13:52:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 15 Feb 2005 13:52:23 +0000 (UTC) Cc: Stephan Stahl , Eli Zaretskii , snogglethorpe@gmail.com, emacs-devel@gnu.org, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 15 14:52:21 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D137W-0003jl-7I for ged-emacs-devel@m.gmane.org; Tue, 15 Feb 2005 14:52:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D13H8-00009I-9M for ged-emacs-devel@m.gmane.org; Tue, 15 Feb 2005 09:02:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D13Ev-0008PL-A0 for emacs-devel@gnu.org; Tue, 15 Feb 2005 08:59:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D13Es-0008Nq-3Y for emacs-devel@gnu.org; Tue, 15 Feb 2005 08:59:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D13Eo-0008N1-PN for emacs-devel@gnu.org; Tue, 15 Feb 2005 08:59:41 -0500 Original-Received: from [81.228.10.107] (helo=av9-2-sn4.m-sp.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D130m-0005pT-Sd; Tue, 15 Feb 2005 08:45:09 -0500 Original-Received: by av9-2-sn4.m-sp.skanova.net (Postfix, from userid 502) id 257F937E56; Tue, 15 Feb 2005 14:45:08 +0100 (CET) Original-Received: from smtp2-2-sn4.m-sp.skanova.net (smtp2-2-sn4.m-sp.skanova.net [81.228.10.182]) by av9-2-sn4.m-sp.skanova.net (Postfix) with ESMTP id 132D737E44; Tue, 15 Feb 2005 14:45:08 +0100 (CET) Original-Received: from sedrcw11488 (t5o58p223.telia.com [195.67.196.223]) by smtp2-2-sn4.m-sp.skanova.net (Postfix) with SMTP id 5113F37E48; Tue, 15 Feb 2005 14:45:06 +0100 (CET) Original-To: "Stephan Stahl" , "Jason Rumney" 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: main.gmane.org gmane.emacs.devel:33475 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33475 ----- Original Message ----- From: "Stephan Stahl" > But C-x 5 2 seems to do this too. The frame gets the focus and is shown on > top of all other windows. But there still seems to be a difference since > Alt-tab makes popups go wrong while C-x 5 2 does not.. I do not know the > code for both but maybe some other has more insight then me.. I think this helped me to realize what is happening. I am not quite sure but I believe this is a good guess: *** This is where the tooltip window gets created (I did not check further to see if it where reused, but the timings suggests to me it is not): >>>> w32fns.c >>>> void my_create_tip_window (f) struct frame *f; { ... tip_window = FRAME_W32_WINDOW (f) = CreateWindow (EMACS_CLASS, ... FRAME_W32_WINDOW (SELECTED_FRAME ()), /* owner */ ... NULL); ... } *** There is a SELECTED_FRAME above. As far as I understands it SELECTED_FRAME is set by operations that Emacs recognize. *** Emacs does not recognize Alt-Tab. This is the real problem and the case we have here is just a special problem with its root in this. I actually wrote about this when we discussed "Popup when buffer file is changed on disk" which Moheb brought up. I implemented some code to take care of this (but maybe it was on the wrong level). I would suggest taking care of the message w32 sends when the user press Alt-Tab. (This is some kind of "got focus message", but I do not know the name at the moment.) The best would IMO to make a hook that is run when the message is received. It could then be used to solve problems like "Popup ..." above too. I am a bit surprised that this does not seem to happen on other platforms. Or does it? I can not understand why, can anyone explain?