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: [simon.marshall@misys.com: mouse-autoselect-window needs a de lay] Date: Wed, 05 Jul 2006 10:26:35 +0200 Message-ID: <44AB77BB.4020700@gmx.at> References: <81CCA6588E60BB42BE68BD029ED4826007E977DA@wimex2.wim.midas-kapiti.com> 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 1152088287 18487 80.91.229.2 (5 Jul 2006 08:31:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Jul 2006 08:31:27 +0000 (UTC) Cc: "'cyd@stupidchicken.com'" , "'rms@gnu.org'" , "'emacs-devel@gnu.org'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 05 10:31:25 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 1Fy2n3-0002hE-DD for ged-emacs-devel@m.gmane.org; Wed, 05 Jul 2006 10:31:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fy2n2-0000Zx-TX for ged-emacs-devel@m.gmane.org; Wed, 05 Jul 2006 04:31:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fy2mo-0000Yr-BF for emacs-devel@gnu.org; Wed, 05 Jul 2006 04:31:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fy2ml-0000Ye-RW for emacs-devel@gnu.org; Wed, 05 Jul 2006 04:31:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fy2ml-0000Yb-K8 for emacs-devel@gnu.org; Wed, 05 Jul 2006 04:31:03 -0400 Original-Received: from [213.165.64.21] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1Fy30c-0001m5-1J for emacs-devel@gnu.org; Wed, 05 Jul 2006 04:45:22 -0400 Original-Received: (qmail invoked by alias); 05 Jul 2006 08:30:54 -0000 Original-Received: from N713P014.adsl.highway.telekom.at (EHLO [62.47.33.14]) [62.47.33.14] by mail.gmx.net (mp019) with SMTP; 05 Jul 2006 10:30:54 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: "Marshall, Simon" In-Reply-To: <81CCA6588E60BB42BE68BD029ED4826007E977DA@wimex2.wim.midas-kapiti.com> 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:56551 Archived-At: Hi Simon, thanks for testing this. > - A value of nil for mouse-autoselect-window doesn't seem to stop it > selecting! I think the xterm.c check should be for > !NILP(mouse_autoselect_window) now. Correct. It should have been done as in w32term. > In fact, setting mouse-autoselect-window to a number, doing ESC C-x on the > defun of mouse-autoselect-window-cancel or mouse-autoselect-window-start, > and moving the mouse is enough to trigger this abort even with one window. I don't get an abort but I'm 100% busy when edebugging this. Hardly an improvement. > - I think the uncertainty over the actual delay is more than a little odd. > It is more than frustrating to have to wait perhaps twice the amount of time > (in fact the doc string says the amount of time is any multiple of > mouse-autoselect-window). Perhaps the problem is that > mouse_autoselect_window_function is run even if the window has not changed? > (Currently it is run if mouse_autoselect_window is a number, regardless of > whether the window has changed or not.) If it were only to run if the > window has changed, perhaps mouse-autoselect-window-start can set > mouse-autoselect-window-position to (mouse-position)? That was my initial approach and it worked pretty well. But (re-)read my previous observation with respect to this: >> 1. Suppose I have two windows - SW is the selected one and UW the >> unselected one. I move the mouse to the menubar as described in Simon's >> original scenario. UW should not be selected here. However, I then >> change my mind and move the mouse to UW. I suppose that UW should be >> selected now - agreed? (It's important to clear this since the current >> autoselect mechanism triggers iff the mouse moves from the selected >> window to an unselected one.) With other words, once I leave a window with the mouse and move to the menubar, I won't autselect another window before I cross a window border again. I was afraid that some people would find this counterintuitive. > Unfortunately, it's a little difficult for me to play around with the lisp > code - I can only avoid an abort by make/make recompile/make each time. > > If you can work out how to make it stable I can help test etc. Simon. Probably, doing this in `handle-select-window' is more practical indeed. (In case of doubt, Stefan's always right.) Anyway, I'll try to find a more practicable solution. Thanks again for the report. martin.