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#24500: 25.1.50; Can't other-window from minibuffer if Ediff control panel frame present Date: Sat, 01 Oct 2016 15:08:56 +0200 Message-ID: <57EFB568.7070305@gmx.at> References: <83a8f1f8l0.fsf@gnu.org> <83mvj0dkhd.fsf@gnu.org> <57E6CE51.1040600@gmx.at> <57EE232E.4090301@gmx.at> <57EF7776.80703@gmx.at> 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 1475327510 10509 195.159.176.226 (1 Oct 2016 13:11:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Oct 2016 13:11:50 +0000 (UTC) Cc: 24500@debbugs.gnu.org To: Richard Copley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 01 15:11:46 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 1bqK4r-0001Ve-2S for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Oct 2016 15:11:41 +0200 Original-Received: from localhost ([::1]:55816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqK4p-0001IA-JA for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Oct 2016 09:11:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqK3L-0000To-Ir for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 09:10:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqK3G-0006AX-Gu for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 09:10:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqK3G-0006AO-Cu for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 09:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bqK3G-0002Cn-5h for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 09:10: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: Sat, 01 Oct 2016 13:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24500 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24500-submit@debbugs.gnu.org id=B24500.14753273528400 (code B ref 24500); Sat, 01 Oct 2016 13:10:02 +0000 Original-Received: (at 24500) by debbugs.gnu.org; 1 Oct 2016 13:09:12 +0000 Original-Received: from localhost ([127.0.0.1]:40402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqK2R-0002BQ-U7 for submit@debbugs.gnu.org; Sat, 01 Oct 2016 09:09:12 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:56405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqK2P-0002BC-Tj for 24500@debbugs.gnu.org; Sat, 01 Oct 2016 09:09:10 -0400 Original-Received: from [192.168.1.100] ([212.95.7.35]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LwF9u-1arA800JB8-0181e4; Sat, 01 Oct 2016 15:09:02 +0200 In-Reply-To: X-Provags-ID: V03:K0:hNy8yyn3FpCM76P0EGj0rYRhWUOIBIupH7NPL4AY7/TQ1mmx1pW 9E0D0W9akkbKJzgky+NS4HA+mAOzvkf/z9p7O+Qd8rd7YYSq9n+bXaIAT26LWvSrwuQWTLl ++Vz/fSj7C7Ef/5txGFreF1+f3m9rUCWt+Krj3Qzm1RxvcTMG6yve62hQnAvBiUzOS90g6P N0PdLBXn8N2lJo8A3lvtw== X-UI-Out-Filterresults: notjunk:1;V01:K0:hF6WGPL23Vo=:lLT/SxHs1KShgr4eD+W2UQ xWL8r4yWkmyyqGtHO5W9ci+iVzLytyJ1/1GoYk2O5mUxOy8hYpmpkMIvxqen6Sxi84V4hCCdc byz7v5wGrknViX+ilxi+eBzQ1scq5i5j0+uqJ8pNRc1ajesBWZlNl+rXVhTrMd8PwQJm5GiGA HpBVpnHMgB117O60XvZ0hg1uNu0OKMOnshy7zlegW1m0QFKCBHBs1IqciUCxMZAH2N+GyT+VH Z3g12ePYeQgxQkgeIwOMWP2bk5v986bcOnb8WqqE6hnQpobt8FUsWLB1RN2bJpR+SjOIF9m6+ 8RzCllNYqMfMyclxnrRsJfDhDOAJT7AW0YqMOjpSLInNRGX38dfL9jabPd1ii4lQKi5gdDp6i wudWiKuz8sjPEVmN5w6h4U0s5UTrGpULmyDFujK7BGi49piJZFEJ4RuCJj3pKj8u1gXKFXTJm YDJoimQzVe66YvvExiTI4QvU/JlMn7f52v8WeGwj85s+Qdn3exIOOmDbgu8PRqLwQz8YCuS5A N62f/TSlZQbPBNR6NI++ky7N2kt4ZorcvqEX2/D1ovih6DPdvqrTStGPe115jtnB0ykvdPv8/ OIrWnVWwPej6Kpd43QslL7MxV0pZ8dODKaDiw8rIKil2sRHyhx4BjulTzIDjYtjOQwjfuWMCg fEPm/Fr3XRfMuUdB+FPqzl7ZTxrtbYdv8Bfqem04eN6MboIQW2547uOFdnGMyPOIL51e7n3+Z jqyLofuETcdbT9SFkg1pIsLFChCGz0aCO+v06uvpJf3XW5c12/eXgF5p9BAMuMHdfdHMIHA3 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:123846 Archived-At: >> With "activated window at the window-manager level" you mean the window >> that has input focus and has its title bar painted differently from >> other windows but is not necessarily the topmost window in the Z-order? >> That window is here the one showing frame 1 after you switched to it via >> C-x o. > > It's the one showing frame 2, as I said. So we seem to have another problem. Just to make sure, I use a mingw32 build of Emacs 25 on Windos XP with the following patch --- a/src/frame.c +++ b/src/frame.c @@ -1157,7 +1157,10 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor if (FRAMEP (xfocus)) { focus = FRAME_FOCUS_FRAME (XFRAME (xfocus)); - if (FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ()) + if ((FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ()) + || (NILP (focus) + && EQ (FRAME_MINIBUF_WINDOW (XFRAME (frame)), + sf->selected_window))) Fredirect_frame_focus (xfocus, frame); } } Now with emacs -Q I put the following form (make-frame '((minibuffer . nil))) in *scratch* and evaluate it via C-x C-e. This gets me a new frame, say F2 which is selected and has input focus. To avoid confusion I make the sole window in F2 show *Messages*. Now I do C-x 5 o which gets me back to the initial frame, say F1. F1 is selected and has input focus. Now I do M-x. F1 is still selected and has input focus. Now I do C-x 5 o. F2 gets selected and has input focus. Can we agree until here? Now I do C-x o. This selects F1 and gives it input focus with the *scratch* window selected. Typed text appears in *scratch*. If F1 and F2 overlap, F2 obscures F1. I suppose you observe something different here. Now I do C-x o again. This selects the minibuffer window on F1. Typed text now appears in the echo area. > Here, after typing M-x in *scratch* in the recipe: > * if I type C-x o the activated window does not change; You mean C-x o does not take you to F2 in my parlance. Here F2 gets selected and input focus. > * if I type C-x 5 o the activated window does change. > > Is that the visible difference you mean? It's not in your original scenario but apparently our installations differ here. Are you sure you applied the same change as I did? >> But what's wrong with that? After all you _did_ use C-x o to select >> that window. > > It's not wrong until you type Alt-Tab. Alt-tabbing was not part of your scenarios so far. Please give a step-by-step recipe indicating the first time it fails. >> Do you mean that on frame 1 you cannot use Alt-Tab to switch to frame 2? > > Possibly. > > Typing Alt-Tab several times switches the window-manager's activation > between frame 1 and frame 2 (and other windows that may be present > if you hold Alt and type Tab more than once). I can switch activation between > the two Emacs windows and any other windows as much as I like, as > evidenced by the title-bar painting style. > > But no amount of typing Alt-Tab changes which Emacs window contains > the solid flashing cursor where text is inserted when I type characters. Here Alt-Tab always switches between all Emacs frames. Otherwise we would have had problems on any multi-frame layed-out Emacs. And certainly we would have had problems in an unpatched Emacs when invoking M-x from the minibuffer-less frame. Can you try if C-x o fails for that as well? > Firstly, no, I'm in frame 2. So you mean that frame 2 has input focus and is selected and clicking on frame 1 does not select frame 1 and give it input focus? Something must be broken on your side. > Secondly, I'm saying that any amount of switching between windows, > either using Alt-Tab, or by clicking on title bars, makes no difference > to the window where text is inserted. Can anyone observe that? I just tried on Windows 7 and see the same behavior as on XP. >> Here at any moment I can use Alt-Tab or the mouse to select any of the >> three windows involved in your scenario and continue typing text there. >> If this doesn't work on your system please tell me precisely where it >> fails. > > I have tried to do that. I'm left without clues. martin