From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: completing-read (and M-x) with pop-up-framesnon-nilchangesframefocus Date: Thu, 21 Jul 2005 14:25:32 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1121971096 29189 80.91.229.2 (21 Jul 2005 18:38:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Jul 2005 18:38:16 +0000 (UTC) Cc: Drew Adams , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 21 20:38:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DvfvC-0002jZ-IX for ged-emacs-devel@m.gmane.org; Thu, 21 Jul 2005 20:37:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DvfxD-0000ux-Mx for ged-emacs-devel@m.gmane.org; Thu, 21 Jul 2005 14:39:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dvftw-00087k-8t for emacs-devel@gnu.org; Thu, 21 Jul 2005 14:36:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dvftd-0007zc-Rx for emacs-devel@gnu.org; Thu, 21 Jul 2005 14:35:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dvfta-0007uC-DH for emacs-devel@gnu.org; Thu, 21 Jul 2005 14:35:46 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DvftR-0005gC-C1; Thu, 21 Jul 2005 14:35:37 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id BA8B82CF46E; Thu, 21 Jul 2005 14:25:36 -0400 (EDT) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id B18844AC00A; Thu, 21 Jul 2005 14:25:32 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 74C48E6C1D; Thu, 21 Jul 2005 14:25:32 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Thu, 21 Jul 2005 13:08:02 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-3.508, requis 5, AWL -1.28, BAYES_00 -4.90, SUBJ_HAS_UNIQ_ID 2.68) X-MailScanner-From: monnier@iro.umontreal.ca 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:41113 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41113 > --- window.c 13 jui 2005 13:58:39 -0400 1.512 > +++ window.c 15 jui 2005 03:30:07 -0400 > @@ -3475,7 +3475,13 @@ > we need to create a new frame. */ > if (pop_up_frames || last_nonminibuf_frame == 0) > { > + Lisp_Object w = Fselected_window (); > + struct gcpro gcpro1; > + GCPRO1 (w); > window = Fframe_selected_window (call0 (Vpop_up_frame_function)); > + if (Fwindow_live_p (w)) > + Fselect_window (w, Qt); > + UNGCPRO; > Fset_window_buffer (window, buffer, Qnil); > return display_buffer_1 (window); > } > It looks plausible to me. I would expect it to have > no effect when the mouse position controls window manager focus, > and that is what it should do, but that needs to be tested. > Could someone test that? I've been using it here on GNU/Linux with a window-manager that does focus-follows-mouse and haven't noticed any problem with it. In reality this patch will have no effect whatsoever in most cases because Vpop_up_frame_function usually doesn't change the selected window, so the call to Fselect_window is a nop (the body exits early). But I still have no idea whether it actually fixes the original problem or not. Someone will have to check it, Stefan