bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24500: 25.1.50; Can't other-window from minibuffer if Ediff control


From: Richard Copley
Subject: bug#24500: 25.1.50; Can't other-window from minibuffer if Ediff control panel frame present
Date: Sat, 1 Oct 2016 13:29:00 +0100

On 1 October 2016 at 11:30, Richard Copley <rcopley@gmail.com> wrote:
> On 1 October 2016 at 09:44, martin rudalics <rudalics@gmx.at> wrote:
>>>> Why do you think so?  The selected frame is frame 1 ever since C-x o
>>>> selected it (and it did so twice in a row).
>>>
>>> OK, then I now realize I have no idea what "selected frame" means.
>>
>> Did you read section "28.10 Input Focus" of the Elisp manual:
>
> Yes.
>
>> Is there
>> anything in your scenario that contradicts what has been written there?
>
> I don't think so.
>
>>> The fact I was attempting to express is that the activated window
>>> at the window-manager level is frame 2.
>>
>> 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.
>
>> Note that there is only one visible difference between C-x 5 o and C-x o
>> in your scenario: The window selected after C-x 5 o must be on the other
>> frame.
>
> Here, after typing M-x in *scratch* in the recipe:
> * if I type C-x o the activated window does not change;
> * if I type C-x 5 o the activated window does change.
>
> Is that the visible difference you mean?
>
>>  The window selected after C-x o can be on the same or the other
>> frame and depends on the cyclic ordering of windows.  In either case the
>> "The selected window always resides on the selected frame." invariant is
>> preserved.
>
>> There is one Emacs internal difference: While focus is "redirected", the
>> window for which this happens still gets the selected window's mode-line
>> appearance.  As a rule, that behavior is always used during minibuffer
>> input, probably because it would be distracting to change highlighting
>> after typing M-x.  But keep in mind that the window initially selected
>> during minibuffer input is the minibuffer window and not that with the
>> highlighted mode-line - regardless whether the minibuffer window is on
>> the same frame or another one.
>>
>>> >> I'm not sure I understand what you mean here.  Do you mean that C-x 5 o
>>> >> after the C-g does not select window2?
>>> >
>>> > I'd better assume that I don't know what "select window2" means either.
>>> >
>>> > I mean that the window with the solid flashing cursor where text is
>>> > inserted
>>> > when you type characters is window2,
>>>
>>> Not window2, sorry. Rather, it's the window displaying *scratch* on frame
>>> 1.
>>
>> 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.
>
>>> > and that can't be changed by
>>> > typing Alt-Tab
>>
>> 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.
>
>>> (which on this Windows system is not passed to Emacs but
>>> > activates a different window),
>>
>> Which one?
>
> Whichever one you want.
>
>>> nor by clicking on the non-client area of frame
>>> > 1
>>
>> But you already are in frame 1.  What should that click accomplish?
>
> Firstly, no, I'm in frame 2.
>
> 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.
>
>>> In fact I hadn't tried C-x 5 o. That does fix things.
>>
>> Anything doing C-x o repeatedly wouldn't fix?
>
> Yes.
>
>>>>> but clicking inside a window on frame 2 does remove
>>>>> the redirection and get things back to normal.
>>>
>>>> What was abnormal before?
>>>
>>> I have no idea what's normal and what isn't any more :)
>>>
>>> I had expected activating frame 2 (using the window manager) to let me
>>> type characters into window2.
>>
>> 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.
> Thanks.

There's a screen-capture video here:
https://buster.me.uk/emacs-bug24500-patch1.webm

Before the video starts I do this:

M-x load-file RET x.el RET ;; Creates and selects a minibuffer-less frame.
C-x b window2 RET ;; Select named window in frame 2 for clarity.
;; Arrange the initial frame 1 on the left and the minibuffer-less
frame 2 on the right.

At this point the video begins.

;; Click inside *scratch* in the left frame.
M-x
;; Click the title bar of the Right Window.
C-x o ;; Select window *scratch* in frame 1.
C-x o ;; Select minibuffer.
C-g ;; Quit M-x

At this point (around 6 seconds in) the flashing solid cursor is in the left
window, and as you can see by the title bar, the activated window is the
window on the right. (The title bar text is black in the active window, grey
in inactive windows.)

I gather that in your tests, Martin, the window on the left is active at
this point. If so then right here is where things first differ for me.

xxx ;; Characters inserted in *scratch*
;; Click on the title bar on the left.
xxx ;; Characters inserted in *scratch*
;; Click on the title bar on the right.
xxx ;; Characters inserted in *scratch*
;; Click inside window2 on the right.
xxx ;; Characters inserted in window2.

This is recorded while using Windows 10. The same thing happens on
my laptop using Windows 7.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]