From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Stop frames stealing eachothers' minibuffers! Date: Tue, 24 Nov 2020 11:25:31 +0100 Message-ID: References: <20201121102751.GA11643@ACM> <18a901b8-3250-b461-eb2a-c13988616e93@gmx.at> <20201121124550.GB11643@ACM> <535bd6d4-3997-2e64-ea43-5de6f0892062@gmx.at> <20201122105947.GA5912@ACM> <59f8d2fa-3db9-078b-56e2-c793f6e69edd@gmx.at> <20201122183826.GG5912@ACM> <20201123133613.GA4635@ACM> <69ba00e6-b182-77e1-911b-d70f9fffa762@gmx.at> <20201123160703.GB4635@ACM> <53833023-d959-07af-7611-aa2e0bdcc1bc@gmx.at> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------DDCE7FC9D62D414768BBE4D3" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27566"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andrii Kolomoiets , emacs-devel@gnu.org, enometh@meer.net, Stefan Monnier , Alan Mackenzie , Eli Zaretskii To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 24 11:29:23 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khVZa-00072K-Q8 for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Nov 2020 11:29:22 +0100 Original-Received: from localhost ([::1]:37710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khVZZ-0003Jr-JZ for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Nov 2020 05:29:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khVW9-0002fF-7P for emacs-devel@gnu.org; Tue, 24 Nov 2020 05:25:49 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:58551) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khVW7-0002HS-4V; Tue, 24 Nov 2020 05:25:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606213534; bh=tb9k4RQo8izUOn6oK+SLa7vqr1RU1Zr0CGe8rSEPR9o=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=GDfkCYfIXargRwalASCVNJlss43vvrjScihZhcevwy5uJr4RfFIupxE9Enp61wnBo 5zHpkAVdMBXFBxuscsyvXDv9LhoEXOMKvfNn+GN2Nr8zXSGaYdVM2eLEnftZRd1rtP nrm8ZxXuPypah+KHj1OIeCG3iYKLSl/E6L4Y/R6Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.50]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MD9XF-1kZ14O3vt3-0096j9; Tue, 24 Nov 2020 11:25:34 +0100 In-Reply-To: <53833023-d959-07af-7611-aa2e0bdcc1bc@gmx.at> Content-Language: en-US X-Provags-ID: V03:K1:jWcv0oqTaLO6NJ/J9S/lfcMc6A0/0wx9i8O35/EeV+3w73pyCPv VtFwcbB0dWM76bBA1ZT5Zax4DVZOFzKtjWagPxNkXKWT/pAeXsuzPlL3Px/37GRJMl0WTvj dxNqmNMDL0c1BWm4qO7lixijgd1PT1As7OrR6ZlypBi+nf58smgrxctZonwJw/bJ8A1RdzA aj3rgbhvmDyTL2XzKTe2A== X-UI-Out-Filterresults: notjunk:1;V03:K0:aEKFdsiLSH0=:+DVDQ3OPLflm0QjOF/ppZ5 pWf/0W/Rj+mx3lhgFFHXq3RvpAjqzd4ijBdQE89y3C14rq2f+BkQ4PVw8S2Gdwxp4jXAvqL1N M8rODKcT/QKRxKoa4XkwhhBL0e2lJoMmzqejNvHr1xbbExrZKNJCikGK421eKv4Tuukbp5JbB UYJis+PgFouK/8BV6Vgz0xhxVfwkzNwEn5mfqJkqxg4L3ulTBwbdx7PuPGS5XNXF7s7og8/Ee BTpoAUk9aISYurqknTYUPmQUnq9h6m7o33+pzDybKw+l0+4xGV+iieMK/0+KCFqE935i1PxVA u7+dfZaJQDCv2sj0rxOOJ2O532nEcFR+OIBZhe8aJpnFEB6rHm6Te5KvjNi6NXOkbdek+kQ/f BduBE4Yogfs8ccjG3/27QExDldsuUnT9JWKaaQEgU4Q433sNMz/PmmgULDwvvK2uxZFFKcGgt 5CwdkQVUa9PA9JSkYZgRuvDcudHTPWiSPy3F1H+dDcF2hhHJhdeIw09U/dhyzYORgqVD8Z/Cq 4Vl3kKdqA6KPJHtGdFK/D9o9BI57/5S2WTGXa9mEf7xkl/x3fw9/vaXOwHLPtlv0pPXR8CXXi Sd93g41yvJizOz0+2jTDlTcbCG5dMgYvsuWe/cQ6D5/Mse+xTV1qVkSqiRzxvDfB326l2C6BC 1zd7B+nBTPSbygSnAR0Gdj4XkZPXJjQvPW/PPgY+av67Iv7WKaGh3mT2pluLJRetWgFvfq5N+ Sffk+AaQ6Wip15QRNl0ebHsQhaKsfIouQosVBSa08s1Ke4RzP6Ch2y41i/HCP/i1DI5Jaizl Received-SPF: pass client-ip=212.227.17.21; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259729 Archived-At: This is a multi-part message in MIME format. --------------DDCE7FC9D62D414768BBE4D3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > > It does not happen with Emacs 23 to 25, and happens with Emacs 26 to 28. > > That's interesting. I'll have to take a look. OK. It was me who introduced that bug in Emacs 26. Many thanks for spotting it. Can both of you confirm that reverting that change fixes the behavior? Patch attached. Thanks, martin --------------DDCE7FC9D62D414768BBE4D3 Content-Type: text/x-patch; name="frame-redirect.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="frame-redirect.diff" diff --git a/src/frame.c b/src/frame.c index 512aaf5f45..f56176910e 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1426,11 +1426,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor if (FRAMEP (gfocus)) { focus = FRAME_FOCUS_FRAME (XFRAME (gfocus)); - if ((FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ()) - /* Redirect frame focus also when FRAME has its minibuffer - window on the selected frame (see Bug#24500). */ - || (NILP (focus) - && EQ (FRAME_MINIBUF_WINDOW (f), sf->selected_window))) + if (FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ()) Fredirect_frame_focus (gfocus, frame); } } --------------DDCE7FC9D62D414768BBE4D3--