From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: Pavel@Janik.cz (Pavel =?iso-8859-2?q?Jan=EDk?=) Newsgroups: gmane.emacs.devel Subject: Re: PATCH: focus follows mouse in C Date: Thu, 07 Feb 2002 22:31:16 +0100 Message-ID: References: <200202071456.g17EujV04572@aztec.santafe.edu> NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 8bit X-Trace: quimby2.netfonds.no 1013118480 3623 195.204.10.66 (7 Feb 2002 21:48:00 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 7 Feb 2002 21:48:00 GMT Cc: emacs-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16YwOd-0000wL-00 for ; Thu, 07 Feb 2002 22:47:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16YwGC-0004ol-00; Thu, 07 Feb 2002 16:39:16 -0500 Original-Received: from p0132.as-l043.contactel.cz ([194.108.242.132] helo=SnowWhite.SuSE.cz) by fencepost.gnu.org with smtp (Exim 3.33 #1 (Debian)) id 16YwFG-0004lW-00; Thu, 07 Feb 2002 16:38:19 -0500 Original-Received: by SnowWhite.SuSE.cz (PJ, from userid 500) id C4703441C4; Thu, 7 Feb 2002 22:40:40 +0100 (CET) Original-To: rms@gnu.org Mail-Copies-To: never X-Face: $"d&^B_IKlTHX!y2d,3;grhwjOBqOli]LV`6d]58%5'x/kBd7.MO&n3bJ@Zkf&RfBu|^qL+ ?/Re{MpTqanXS2'~Qp'J2p^M7uM:zp[1Xq#{|C!*'&NvCC[9!|=>#qHqIhroq_S"MH8nSH+d^9*BF: iHiAs(t(~b#1.{w.d[=Z In-Reply-To: <200202071456.g17EujV04572@aztec.santafe.edu> (Richard Stallman's message of "Thu, 7 Feb 2002 07:56:45 -0700 (MST)") User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-gnu) Original-Lines: 65 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:871 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:871 From: Richard Stallman Date: Thu, 7 Feb 2002 07:56:45 -0700 (MST) > + if (x_autoselect_window_p) > + { > + int area; > + Lisp_Object window; > + > + window = window_from_coordinates (frame, XINT (event->x), XINT (event->y), &area, 0); > + > + if (WINDOW_LIVE_P (window) && !MINI_WINDOW_P (XWINDOW(window))) > + Fselect_window(window); > + } > + > > It looks like this selects the window on every motion of the mouse. > That may be what you don't like. Maybe it should select the window > only when the mouse moves into a different window. For the user, it has this behaviour. Yes, it is ugly to call Fselect_window for each window and wait for it to execute if (EQ (window, selected_window)) return window; It should be directly here. Fixed. > Also, it seems to be completely unwilling to select a minibuffer window. > When the minibuffer is active, it should be selectable like any other window. Nice idea, here it is: if (x_autoselect_window_p) { int area; Lisp_Object window; window = window_from_coordinates (frame, XINT (event->x), XINT (event->y), &area, 0); /* Window will be selected only when it is not selected now. Minibuffer window will be selected iff it is active. */ if (!EQ (window, selected_window) && (!MINI_WINDOW_P (XWINDOW(window)) || (EQ (window, minibuf_window) && minibuf_level > 0))) Fselect_window (window); } Maybe we can also use `area' here to allow user to customize this behaviour. E.g. mouse over mode-line/fringe/scroll-bar does/doesn't select window or something similar. Maybe a customizable list x-autoselect-window-parts with full value '(text mode-line vertical-border header-line left-fringe right-fringe)? If something will be missing here, mouse over it can not select the window? Well, maybe I'm crazy, but the implementation of this will surely wait for feedback from real users of this feature. What I do not like when x-autoselect-window is t, is connected with my working habits. I think it can be *really* useful to people who use focus-follows-mouse in their window managers and are used to that behaviour. -- Pavel Janík Ask three people which VM is best, and you will get four answers ;) -- Hubert Mantel about VM in 2.4.x _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel