From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@iro.umontreal.ca>, 24803@debbugs.gnu.org
Subject: bug#24803: Redirection problem with separate minibuffer frame
Date: Thu, 27 Oct 2016 19:35:18 +0200 [thread overview]
Message-ID: <58123AD6.4070703@gmx.at> (raw)
In-Reply-To: <jwvpomn9e4j.fsf@iro.umontreal.ca>
> I'm seeing redirection problems in my Emacs setup (with separate
> minibuffer-only frame). I suspect it comes from
>
> commit 421c0512f76683e0b85ea5e1362291c2da4149ba
> Author: Martin Rudalics <rudalics@gmx.at>
> 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
next prev parent reply other threads:[~2016-10-27 17:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 18:09 bug#24803: Redirection problem with separate minibuffer frame Stefan Monnier
2016-10-27 17:35 ` martin rudalics [this message]
2016-10-29 22:54 ` Stefan Monnier
2016-10-30 8:47 ` martin rudalics
2020-11-25 9:26 ` martin rudalics
2021-05-19 8:12 ` martin rudalics
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=58123AD6.4070703@gmx.at \
--to=rudalics@gmx.at \
--cc=24803@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.