From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#24803: Redirection problem with separate minibuffer frame Date: Thu, 27 Oct 2016 19:35:18 +0200 Message-ID: <58123AD6.4070703@gmx.at> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1477590986 19646 195.159.176.226 (27 Oct 2016 17:56:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2016 17:56:26 +0000 (UTC) To: Stefan Monnier , 24803@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 27 19:56:21 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzoub-0004Rr-1r for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Oct 2016 19:56:21 +0200 Original-Received: from localhost ([::1]:43486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzoud-000688-Ge for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Oct 2016 13:56:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzoaz-0007HQ-Tj for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2016 13:36:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzoaw-0003Yj-QT for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2016 13:36:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45611) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bzoaw-0003YY-MT for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2016 13:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bzoaw-0001WE-HL for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2016 13:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2016 17:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24803 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24803-submit@debbugs.gnu.org id=B24803.14775897325796 (code B ref 24803); Thu, 27 Oct 2016 17:36:02 +0000 Original-Received: (at 24803) by debbugs.gnu.org; 27 Oct 2016 17:35:32 +0000 Original-Received: from localhost ([127.0.0.1]:32777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzoaS-0001VP-2V for submit@debbugs.gnu.org; Thu, 27 Oct 2016 13:35:32 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:57249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzoaQ-0001VC-L9 for 24803@debbugs.gnu.org; Thu, 27 Oct 2016 13:35:31 -0400 Original-Received: from [192.168.1.100] ([212.95.7.14]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MFAaV-1c64up0hdT-00GEYS; Thu, 27 Oct 2016 19:35:20 +0200 In-Reply-To: X-Provags-ID: V03:K0:LDeqJxTxy73+T48pvwljHvG3UyFj+t0beIme4QpSClo0RNex52X Eq+1BIGpdFgeMW7iQLRtVVmcgd4Rs0JUAVz+scCTYd1HqiqpQU9HA+iSodHcNKtXN7iFQT+ 92mxw1MYYmYyCQk5UR73ggRtOgihgoV418wKntAyG3iglU/g2tDpKRfv99uvTppqeCJBIpw XJUk00abGvJxVWDaiRecw== X-UI-Out-Filterresults: notjunk:1;V01:K0:qPF9kexRy0I=:y7/43bWxtsGzcXB45y8UHq JLZSwN97aTTnIi2yqDdveqfijJqPVtLiztEmYfF0uosMQ9BPt3CBAqSKtaQbEiIcFs3/tJHV1 DZU04HlsVobMQXbDTk9Rdq1Ah+nPgPrxm4RCXjlMSLvBRIAcXh0o1SLeILUIED1/L878Zf6rZ fB1JN2jK+4ooM1syFE5G5yNmACWnveIJI2R4l4XFeIsJ/jsGWwtHaiDdBEEaOTlIjeGauHwsV bCX6ixV7H/SDvTLU0GhfqzXQwqMRS4a0HQaqi+YkUgNFm5y2v5ua2JV6ImJcu5DFSEAcf6wBB sfGnhW8HqH4Il6PMLH9Q0KKBJRbe8Oqunp9viUVEUbps362UPbUkVRhrIkUFCUcGoD4tvGNET 4iofE+ETtC+VEvtfiQHdswuY/o0vhO4VyELrCRzMQcybjXRL7ww1peAgTetDRFfyCLWTEHHog DdPUKlDXWL6aKKHuK4hJzLS2L2eDJun7uO6aVREk4F3joSn9tGLH8tSO7r8FEQuSsAg2MpjaX Atqt9Z/iXgI4McB6T4MWjnFuEZjyKdr8kDAE58MBwpRpX194CRJLuRTpH3f/l5pEAjF+uNlBX RxQYcy71SxyzuJEUpqGrwHkp4/nckcMuyLTYd3tKDpnmv644Jwflmrs+nTCg4kfd40/KsJF6H Xnv5JpmF1ac/mFBdT3qJJNGRvlGnI5WZgnCt3yFb/2tPAJX8OX8t2qGh7voTYP1C2FA2g4CLP ZsFqN9fjo1jhLSxPnan2H0cv68dnPHFL9kT/8jCkZDgO46IZQtmIiRJdsE55FFn8QMZPwiKG X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125073 Archived-At: > I'm seeing redirection problems in my Emacs setup (with separate > minibuffer-only frame). I suspect it comes from > > commit 421c0512f76683e0b85ea5e1362291c2da4149ba > Author: Martin Rudalics > Date: Mon Oct 17 10:52:01 2016 +0200 > > Fix frame focus redirection with shared minibuffer windows (Bug#24500) > > * src/frame.c (do_switch_frame): Redirect frame focus also when > the frame switched to has its minibuffer window on the selected > frame. > * src/window.c (candidate_window_p): To qualify as candidate > it's not sufficient for the window's frame to just share the > minibuffer window - it must be active as well. Please revert the frame.c change so we can be sure which of the two is the real culprit. > I just managed to reliably reproduce one of the symptoms of the problem: > > % emacs -Q --eval "(setq default-frame-alist '((minibuffer)))" > ... place the minibuffer frame so that half of it covers the main frame ... > ... now from the minibuffer frame, do > C-h f car RET > > at this point, the stacking order has been changed: the main frame is above > the minibuffer-only frame. Then I move the mouse into the part of the > minibuffer frame still visible and I type > > ffff > > The first `f` should call `find-file` (according to > minibuffer-inactive-mode-map), but instead the `ffff` text gets inserted > into the *scratch* buffer because of some inappropriate focus redirection. > [ This recipe depends on using a window-manager with > focus-follows-mouse and it might also depend on other aspects of the > window manager's behavior. ] Works as intended on both Windows XP and a GTK+ build with XFCE on Debian. I use focus-follows-mouse plus auto-raise-frame though the minibuffer does _not_ get autoraised when moving the mouse there. Actually, that's what I would call a misbehavior here ;-) > + if (!NILP (FRAME_FOCUS_FRAME (XFRAME (frame))) > + && !EQ (FRAME_FOCUS_FRAME (XFRAME (frame)), frame)) [...] > + if (minibuf_level == 0) Hmm... This seems to indicate that I do not remove the redirection when exiting the minibuffer. Could you try to augment in read_minibuf_unwind if (minibuf_level == 0) resize_mini_window (XWINDOW (window), 0); to something that for each frame redirects focus to itself? Obviously, this might fail with recursive minibuffer invocations from two different frames ... martin