all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Richard Copley <rcopley@gmail.com>
Cc: 24500@debbugs.gnu.org
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	[thread overview]
Message-ID: <57EFB568.7070305@gmx.at> (raw)
In-Reply-To: <CAPM58oix3CUOGdU228nt+rAHch6oLXYhYpiiqz86TLmkTaFgcA@mail.gmail.com>

 >> 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





  parent reply	other threads:[~2016-10-01 13:08 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 17:23 bug#24500: 25.1.50; Can't other-window from minibuffer if Ediff control panel frame present Richard Copley
2016-09-21 17:47 ` Eli Zaretskii
2016-09-21 20:09   ` Richard Copley
2016-09-22 15:26     ` Eli Zaretskii
2016-09-24 19:04       ` martin rudalics
2016-09-28 23:21         ` Richard Copley
2016-09-30  8:32           ` martin rudalics
2016-09-30 18:13             ` Richard Copley
2016-09-30 18:21               ` Richard Copley
2016-10-01  8:44               ` martin rudalics
2016-10-01 10:30                 ` Richard Copley
2016-10-01 12:29                   ` Richard Copley
2016-10-01 13:09                     ` martin rudalics
2016-10-01 13:08                   ` martin rudalics [this message]
2016-10-01 14:54                     ` Richard Copley
2016-10-01 18:50                       ` martin rudalics
2016-10-03 18:32                         ` Richard Copley
2016-10-04  6:49                           ` martin rudalics
2016-10-03 19:35           ` Richard Copley
2016-10-04  6:49             ` martin rudalics
2016-10-08 17:37             ` martin rudalics
2016-10-08 18:28               ` Richard Copley
2016-10-09  7:51                 ` martin rudalics
2016-10-17  8:58                   ` martin rudalics
2016-09-23  6:05 ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57EFB568.7070305@gmx.at \
    --to=rudalics@gmx.at \
    --cc=24500@debbugs.gnu.org \
    --cc=rcopley@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.