GNU bug report logs - #2025
23.0.60; emacsclient: frame does not get focus on opening

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Sat, 24 Jan 2009 15:25:03 UTC

Severity: normal

Tags: notabug, wontfix

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 2025 <at> debbugs.gnu.org
Subject: bug#2025: 23.0.60; emacsclient: frame does not get focus on opening
Date: Wed, 05 Oct 2011 10:31:31 +0200
On Wed, 05 Oct 2011 00:48:00 -0400 Glenn Morris <rgm <at> gnu.org> wrote:

> Stephen Berman wrote:
>
>> If I use server-start, then frames opened by `emacsclient -c' do not
>> automatically get desktop focus:
>>
>> emacs -Q -f server-start
>> emacsclient -c
>> => The frame that appears does not have desktop focus (rather, the xterm
>> window still has focus).
>
> I cannot reproduce this. Do you still see it?

Yes; however, ...

> (I know nothing about this; doesn't the window manager have some control
> over it?)

Apparently, though I didn't think to test this in my OP.  But now I see
this problem with KWin (currently KDE 4.7.1, on openSUSE 11.4), starting
Emacs either from Konsole or Xterm, but not with IceWM (I don't have
Gnome on this system).

Also, my recipe was a bit imprecise: either the first line should end
with `&' or you have to background the process to invoke emacsclient.
Moreover, I see a peculiar difference between Konsole and Xterm on KWin:
Invoking `emacs -Q -f server-start' (with or without '&') from Konsole
opens a frame which gets focus, but when invoked from Xterm, this frame,
too, does not get focus.  Whereas with both terminal emulators, frames
opened by `emacsclient -c' fail to get focus.

Again, this is after initially starting Emacs with server-start; as my
OP noted, starting with --daemon, subsequent invocations of `emacsclient
-c' do open a frame with focus -- at least when invoked from Konsole:
with Xterm there seems to be some kind of race condition, because
sometimes the frame gets focus, sometimes it doesn't.

Anyway, it looks like this may not be a problem that can be solved by
Emacs, so I suppose this bug can be closed.

Steve Berman




This bug report was last modified 13 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.