emacs-devel
[Top][All Lists]
Advanced

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

Re: save-frame-excursion?


From: Stefan Monnier
Subject: Re: save-frame-excursion?
Date: Sun, 26 Jul 2009 10:26:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

>> A select-frame inside calendar should be undoable with just
>> a select-frame in org-mode.
> calendar-frame-setup uses `make-frame' which does not only select the
> frame, but also focuses onto it.  Hence `select-frame-set-input-focus'
> for restoring the focus in the minibuffer.

Thanks for digging deeper, so the problem is not just that focus
switches to some other frame, but that a new frame is created.
Note also that make-frame's docstring says:

   This function itself does not make the new frame the selected frame.
   The previously selected frame remains selected.  However, the
   window system may select the new frame for its own reasons, for
   instance if the frame appears under the mouse pointer and your
   setup is for focus to follow the pointer.

So the really better fix would be to make sure make-frame doesn't change
the focus (especially since the above note is not quite correct: even
for click-to-focus WMs, the new frames may get selected just by virtue
of being new, which is most likely what you're seeing).


        Stefan




reply via email to

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