[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: closing emacsclient always focuses another emacs window
From: |
Eli Zaretskii |
Subject: |
Re: closing emacsclient always focuses another emacs window |
Date: |
Mon, 10 Mar 2014 22:29:54 +0200 |
> Date: Mon, 10 Mar 2014 22:03:45 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: help-gnu-emacs@gnu.org
>
> > From: Michael Heerdegen <michael_heerdegen@web.de>
> > Date: Mon, 10 Mar 2014 20:40:32 +0100
> >
> > > AFAIK, which frame becomes selected in this situation is determined by
> > > the window manager.
> >
> > I don't think that's what's happening.
> >
> > This is what is evaluated:
> >
> > (apply 'server-switch-buffer (server-done))
> >
> > After `server-done' is evaluated, the client (e.g. the xterm) always has
> > input focus. The fact that
> >
> > (advice-add
> > 'server-switch-buffer :around
> > (lambda (f &rest args)
> > (when (car args) (apply f args))))
> >
> > fixes the problem for the OP shows that this is also the case for him.
> >
> > Note: while (server-done) is evaluated, `server-delete-client' calls
> > `delete-frame', which implicitly selects another Emacs frame.
> >
> > Ok, after evaluating (server-done) now we have a different Emacs frame
> > selected, the server frame was deleted, and xterm has focus.
> >
> > Now, `server-switch-buffer' is evaluated (without any Emacs frame having
> > input focus), and, depending on the current selected frame,
> > `select-frame-set-input-focus'es it as I explained.
> >
> > So, the issue is completely independent from any window manager.
>
> I'm sorry, but you lost me.
>
> All I know is that I don't see on my system any Emacs frame being
> raised.
Sorry, hit the wrong key.
What I wanted to say is that Emacs doesn't have any capabilities to
set input focus to a TTY (or xterm) frame. It can only do that for
GUI frames, and even then not always.
Also, selecting a frame doesn't mean that frame gets focus, even for
GUI frames. There's always a selected frame in Emacs, but focus might
well belong to another application, so we could have a situation where
none of the Emacs frames has focus.
So I'm not at all sure how all this description of what happens with
selecting a different frame is relevant to the issue at hand, which
(AFAIU) is about Emacs TTY frames or xterm windows that get or don't
get focus after "C-x #".
- Re: closing emacsclient always focuses another emacs window, (continued)
- Message not available
- Re: closing emacsclient always focuses another emacs window, trygve . flathen, 2014/03/09
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/09
- Message not available
- Re: closing emacsclient always focuses another emacs window, trygve . flathen, 2014/03/09
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/09
- Re: closing emacsclient always focuses another emacs window, Eli Zaretskii, 2014/03/09
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/10
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/10
- Re: closing emacsclient always focuses another emacs window, Eli Zaretskii, 2014/03/10
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/10
- Re: closing emacsclient always focuses another emacs window, Eli Zaretskii, 2014/03/10
- Re: closing emacsclient always focuses another emacs window,
Eli Zaretskii <=
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/10
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/10
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/11
- Re: closing emacsclient always focuses another emacs window, Eli Zaretskii, 2014/03/11
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/11
- Message not available
- Re: closing emacsclient always focuses another emacs window, trygve . flathen, 2014/03/12
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/13
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/26
- Message not available
- Re: closing emacsclient always focuses another emacs window, trygve . flathen, 2014/03/12
- Re: closing emacsclient always focuses another emacs window, Michael Heerdegen, 2014/03/09