From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: [rudalics@gmx.at: Re: [simon.marshall@misys.com: mouse-autoselect-window needs a de lay]] Date: Tue, 05 Sep 2006 14:53:57 +0200 Message-ID: <44FD7365.10901@gmx.at> References: <854pvpym4i.fsf@lola.goethe.zz> <44FBEEFC.3040205@gmx.at> <44FD41A7.5020100@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1157461051 15406 80.91.229.2 (5 Sep 2006 12:57:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Sep 2006 12:57:31 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 05 14:57:29 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GKaTs-0006QB-Ob for ged-emacs-devel@m.gmane.org; Tue, 05 Sep 2006 14:56:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GKaTs-0005fl-DO for ged-emacs-devel@m.gmane.org; Tue, 05 Sep 2006 08:56:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GKaTh-0005fQ-8Y for emacs-devel@gnu.org; Tue, 05 Sep 2006 08:56:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GKaTf-0005ei-J9 for emacs-devel@gnu.org; Tue, 05 Sep 2006 08:56:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GKaTf-0005ee-Ff for emacs-devel@gnu.org; Tue, 05 Sep 2006 08:56:31 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1GKaeP-00032V-BN for emacs-devel@gnu.org; Tue, 05 Sep 2006 09:07:37 -0400 Original-Received: (qmail invoked by alias); 05 Sep 2006 12:56:27 -0000 Original-Received: from N725P031.adsl.highway.telekom.at (EHLO [62.47.34.159]) [62.47.34.159] by mail.gmx.net (mp031) with SMTP; 05 Sep 2006 14:56:27 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: "Kim F. Storm" In-Reply-To: X-Y-GMX-Trusted: 0 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:59368 Archived-At: > Don't (mouse-position) or (mouse-pixel-position) give the current position > when you install the timer? No. I use `mouse-position' and it gives the position where the mouse pointer crosses the window border, in the window I move to. I didn't try `mouse-pixel-position' but IMO it would be a bug if it did refer to another position. >>When the timer triggers I do (provided other conditions apply as well) >> >>- for a positive delay select the window, > > > Do we really need that option? A simple delay is standard for focus follows mouse policies. I don't really want to omit that. >>- for a negative delay check whether mouse-position is the same as the >> last time I checked. > > > That's what I think should be the default ... don't select the window until > the mouse movement stops. But detect that quickly! You can always set the delay to a very small value. In my experience less than 0.2 seconds never sensibly delays selection but may select the window too quickly. It depends on your mouse mileage though, personally I like nervous mice. > Can't you just use a (fixed) 0.1 second timer the first time ? It's been one of my first attempts to deal with the problem (and I used exactly 0.1 seconds IIRC). It didn't work reliably though, and I didn't try to find out why. Maybe another timer ... >>Currently, there is only one delay. Do you think I should use two >>different delays? > > > No. One timer "mouse-movement-stopped-timeout" would be ok. > What about a cons with the delay in the car and a boolean for "dont-select-while-mouse-moves" in the cdr?