From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: gerd.moellmann@t-online.de (Gerd Moellmann) Newsgroups: gmane.emacs.devel Subject: Re: x_autoselect_window_p Date: 01 Apr 2002 16:55:54 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <861ydz5uyt.fsf@gerd.dnsq.org> References: <200203131058.g2DAwnL05479@wijiji.santafe.edu> <86r8lz3h4z.fsf@gerd.dnsq.org> Reply-To: gerd@gnu.org NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1017673096 9649 127.0.0.1 (1 Apr 2002 14:58:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 1 Apr 2002 14:58:16 +0000 (UTC) Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16s3GC-0002VW-00 for ; Mon, 01 Apr 2002 16:58:16 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16s3RR-0006CH-00 for ; Mon, 01 Apr 2002 17:09:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16s3F1-00035r-00; Mon, 01 Apr 2002 09:57:03 -0500 Original-Received: from mailout04.sul.t-online.com ([194.25.134.18]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16s3EA-000309-00 for ; Mon, 01 Apr 2002 09:56:10 -0500 Original-Received: from fwd06.sul.t-online.de by mailout04.sul.t-online.com with smtp id 16s3E8-0003Uz-01; Mon, 01 Apr 2002 16:56:08 +0200 Original-Received: from gerd.dnsq.org (520015515780-0001@[217.230.97.250]) by fwd06.sul.t-online.com with esmtp id 16s3Dw-062WbwC; Mon, 1 Apr 2002 16:55:56 +0200 Original-Received: from gerd.dnsq.org (localhost [127.0.0.1]) by gerd.dnsq.org (8.12.2/8.12.2) with ESMTP id g31EtsCU002396 for ; Mon, 1 Apr 2002 16:55:54 +0200 (CEST) (envelope-from gerd@gnu.org) Original-Received: (from gerd@localhost) by gerd.dnsq.org (8.12.2/8.12.2/Submit) id g31Etshl002393; Mon, 1 Apr 2002 16:55:54 +0200 (CEST) X-Authentication-Warning: gerd.dnsq.org: gerd set sender to gerd@gnu.org using -f Original-To: emacs-devel@gnu.org In-Reply-To: Original-Lines: 42 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 X-Sender: 520015515780-0001@t-dialin.net Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2302 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2302 Pavel@janik.cz (Pavel Jan=EDk) writes: > > > + /* Window will be selected only when it is not selected n= ow and > > > + last mouse movement event was not in it. Minibuffer window > > > + will be selected iff it is active. */ > > > + if (!EQ (window, last_window) > > > + && !EQ (window, selected_window) > > > + && (!MINI_WINDOW_P (XWINDOW (window)) > > > + || (EQ (window, minibuf_window) && minibuf_level > 0))) > >=20 > > Maybe it's better to leave this condition testing to the Lisp functi= on > > that is called at the end for handling the event? It would have the > > advantage of being more flexible. >=20 > Well, we can split this. I do not want to generate an event for every > mouse move, so I think it is OK to have >=20 > + if (!EQ (window, last_window) > + && !EQ (window, selected_window) >=20 > here, but the rest can in fact be moved to Elisp. Yes, probably. > >=20 > > > + { > > > + fprintf(stderr, "WINDOW_IN_EVENT generated!\n"); > > > + > > > + bufp->kind =3D WINDOW_IN_EVENT; > > > + XSETFRAME (bufp->frame_or_window, window); > > > + bufp->arg =3D Qnil; > >=20 > > Strictly speaking, it might be a good idea to check for numchars > 0 > > before filling in the event. >=20 > Like this? Yup. I guess that's all, then. Except maybe that I forgot to warn that I didn't see the case handled where the mouse is moved to something that's not selectable.