From: Bastien <bastienguerry@googlemail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: save-frame-excursion?
Date: Mon, 27 Jul 2009 11:42:28 +0800 [thread overview]
Message-ID: <87skgilrkr.fsf@bzg.ath.cx> (raw)
In-Reply-To: <jwv1vo3fruu.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 26 Jul 2009 10:26:00 -0400")
[-- Attachment #1: Type: text/plain, Size: 447 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 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).
This patch makes sure that `make-frame' gives the focus back to the
previously selected frame.
Shall I apply this?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: frame.el.patch --]
[-- Type: text/x-diff, Size: 709 bytes --]
--- frame.el.~1.300.~ 2009-07-27 03:20:02.000000000 +0800
+++ frame.el 2009-07-27 11:40:23.000000000 +0800
@@ -749,7 +749,8 @@
instance if the frame appears under the mouse pointer and your
setup is for focus to follow the pointer."
(interactive)
- (let* ((w (cond
+ (let* ((f (selected-frame))
+ (w (cond
((assq 'terminal parameters)
(let ((type (terminal-live-p (cdr (assq 'terminal parameters)))))
(cond
@@ -777,6 +778,7 @@
(let ((val (frame-parameter oldframe param)))
(when val (set-frame-parameter frame param val)))))
(run-hook-with-args 'after-make-frame-functions frame)
+ (x-focus-frame f)
frame))
(defun filtered-frame-list (predicate)
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Bastien
next prev parent reply other threads:[~2009-07-27 3:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 17:30 save-frame-excursion? Bastien
2009-07-23 20:56 ` save-frame-excursion? Stefan Monnier
2009-07-24 2:24 ` save-frame-excursion? Robert Goldman
2009-07-24 3:16 ` save-frame-excursion? Stefan Monnier
2009-07-24 3:28 ` save-frame-excursion? Robert Goldman
2009-07-24 19:24 ` save-frame-excursion? Stefan Monnier
2009-07-24 21:18 ` save-frame-excursion? Robert Goldman
2009-07-25 14:39 ` save-frame-excursion? Stefan Monnier
2009-07-25 11:42 ` save-frame-excursion? Bastien
2009-07-25 14:42 ` save-frame-excursion? Stefan Monnier
2009-07-25 22:11 ` save-frame-excursion? Bastien
2009-07-26 14:26 ` save-frame-excursion? Stefan Monnier
2009-07-26 17:00 ` save-frame-excursion? Drew Adams
2009-07-27 3:42 ` Bastien [this message]
2009-07-27 4:50 ` save-frame-excursion? Stephen J. Turnbull
2009-07-27 4:58 ` save-frame-excursion? Bastien
2009-07-27 17:49 ` save-frame-excursion? Stefan Monnier
2009-07-27 21:05 ` save-frame-excursion? Bastien
2009-07-28 2:25 ` save-frame-excursion? Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87skgilrkr.fsf@bzg.ath.cx \
--to=bastienguerry@googlemail.com \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).