GNU bug report logs -
#2025
23.0.60; emacsclient: frame does not get focus on opening
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2025 in the body.
You can then email your comments to 2025 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2025
; Package
emacs
.
(Sat, 24 Jan 2009 15:25:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sat, 24 Jan 2009 15:25:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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).
This contrasts with using --daemon:
emacs -Q --daemon
emacsclient -c
=> The frame that appears has desktop focus
I think the server-start case is a user interface bug; the frame should
get focus as it does with --daemon.
In GNU Emacs 23.0.60.30 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
of 2009-01-21 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#2025
; Package
emacs
.
(Wed, 05 Oct 2011 04:49:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 2025 <at> debbugs.gnu.org (full text, mbox):
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?
(I know nothing about this; doesn't the window manager have some control
over it?)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#2025
; Package
emacs
.
(Wed, 05 Oct 2011 08:32:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 2025 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#2025
; Package
emacs
.
(Wed, 05 Oct 2011 17:17:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 2025 <at> debbugs.gnu.org (full text, mbox):
Stephen Berman wrote:
> Anyway, it looks like this may not be a problem that can be solved by
> Emacs, so I suppose this bug can be closed.
Maybe someone who knows about these things (window manager hints etc?)
could comment...
[looks around hopefully for Jan D.]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#2025
; Package
emacs
.
(Wed, 05 Oct 2011 18:55:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 2025 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris skrev 2011-10-05 19:15:
> Stephen Berman wrote:
>
>> Anyway, it looks like this may not be a problem that can be solved by
>> Emacs, so I suppose this bug can be closed.
>
> Maybe someone who knows about these things (window manager hints etc?)
> could comment...
>
> [looks around hopefully for Jan D.]
>
>
A hint is just a hint, the WM may do as it please anyway. It is considered
bad behaviour to try to steal input focus when started. It should depend on
what policy the user has set, focus-follows-mouse or click-to-focus.
If Emacs is started with focus-follows-mouse and the mouse isn't in a frame, I
would expect Emacs not to have focus. However, some WMs warp the mouse to
newly started applications. For click-to-focus I think the WM just does what
it thinks is best. Some WMs have a setting ("give focus to new window") which
the user can use to influence this.
So to conclude, if Emacs where to try do anything, there are window managers
where this would fail anyway. Better if the OP can get KWin to behave. Maybe
there is some option for this in KWin.
Jan D.
Added tag(s) notabug and wontfix.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 05 Oct 2011 21:34:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Wed, 05 Oct 2011 21:34:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
bug acknowledged by developer.
(Wed, 05 Oct 2011 21:34:03 GMT)
Full text and
rfc822 format available.
Message #24 received at 2025-done <at> debbugs.gnu.org (full text, mbox):
tags 2025 notabug wontfix
stop
It sounds like there is nothing to be done on the Emacs end, so I will
close this.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#2025
; Package
emacs
.
(Wed, 05 Oct 2011 21:51:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 2025 <at> debbugs.gnu.org (full text, mbox):
Jan Djärv <jan.h.d <at> swipnet.se> writes:
> A hint is just a hint, the WM may do as it please anyway. It is
> considered bad behaviour to try to steal input focus when started. It
> should depend on what policy the user has set, focus-follows-mouse or
> click-to-focus.
>
> If Emacs is started with focus-follows-mouse and the mouse isn't in a
> frame, I would expect Emacs not to have focus. However, some WMs warp
> the mouse to newly started applications. For click-to-focus I think
> the WM just does what it thinks is best. Some WMs have a setting
> ("give focus to new window") which the user can use to influence this.
>
> So to conclude, if Emacs where to try do anything, there are window
> managers where this would fail anyway. Better if the OP can get KWin
> to behave. Maybe there is some option for this in KWin.
According to teh Google, the Kwin setting in question is called "focus
stealing prevention level", which should be set to "none" to allow
newly-launched applications to acquire focus.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#2025
; Package
emacs
.
(Wed, 05 Oct 2011 22:20:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 2025 <at> debbugs.gnu.org (full text, mbox):
On Wed, 05 Oct 2011 17:50:42 -0400 Chong Yidong <cyd <at> stupidchicken.com> wrote:
> Jan Djärv <jan.h.d <at> swipnet.se> writes:
>
>> A hint is just a hint, the WM may do as it please anyway. It is
>> considered bad behaviour to try to steal input focus when started. It
>> should depend on what policy the user has set, focus-follows-mouse or
>> click-to-focus.
>>
>> If Emacs is started with focus-follows-mouse and the mouse isn't in a
>> frame, I would expect Emacs not to have focus. However, some WMs warp
>> the mouse to newly started applications. For click-to-focus I think
>> the WM just does what it thinks is best. Some WMs have a setting
>> ("give focus to new window") which the user can use to influence this.
>>
>> So to conclude, if Emacs where to try do anything, there are window
>> managers where this would fail anyway. Better if the OP can get KWin
>> to behave. Maybe there is some option for this in KWin.
>
> According to teh Google, the Kwin setting in question is called "focus
> stealing prevention level", which should be set to "none" to allow
> newly-launched applications to acquire focus.
You beat me to the punch :-). That indeed seems to do the trick.
(Maybe I should take more time to learn about KWin -- but that would
mean having less time to spend on Emacs...)
Steve Berman
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 03 Nov 2011 11:24:04 GMT)
Full text and
rfc822 format available.
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.