* bug#2025: 23.0.60; emacsclient: frame does not get focus on opening @ 2009-01-24 15:16 Stephen Berman 2011-10-05 4:48 ` Glenn Morris 0 siblings, 1 reply; 8+ messages in thread From: Stephen Berman @ 2009-01-24 15:16 UTC (permalink / raw) To: emacs-pretest-bug 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#2025: 23.0.60; emacsclient: frame does not get focus on opening 2009-01-24 15:16 bug#2025: 23.0.60; emacsclient: frame does not get focus on opening Stephen Berman @ 2011-10-05 4:48 ` Glenn Morris 2011-10-05 8:31 ` Stephen Berman 0 siblings, 1 reply; 8+ messages in thread From: Glenn Morris @ 2011-10-05 4:48 UTC (permalink / raw) To: Stephen Berman; +Cc: 2025 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?) ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#2025: 23.0.60; emacsclient: frame does not get focus on opening 2011-10-05 4:48 ` Glenn Morris @ 2011-10-05 8:31 ` Stephen Berman 2011-10-05 17:15 ` Glenn Morris 0 siblings, 1 reply; 8+ messages in thread From: Stephen Berman @ 2011-10-05 8:31 UTC (permalink / raw) To: Glenn Morris; +Cc: 2025 On Wed, 05 Oct 2011 00:48:00 -0400 Glenn Morris <rgm@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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#2025: 23.0.60; emacsclient: frame does not get focus on opening 2011-10-05 8:31 ` Stephen Berman @ 2011-10-05 17:15 ` Glenn Morris 2011-10-05 18:54 ` Jan Djärv 0 siblings, 1 reply; 8+ messages in thread From: Glenn Morris @ 2011-10-05 17:15 UTC (permalink / raw) To: Stephen Berman; +Cc: 2025 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.] ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#2025: 23.0.60; emacsclient: frame does not get focus on opening 2011-10-05 17:15 ` Glenn Morris @ 2011-10-05 18:54 ` Jan Djärv 2011-10-05 21:33 ` Glenn Morris 2011-10-05 21:50 ` Chong Yidong 0 siblings, 2 replies; 8+ messages in thread From: Jan Djärv @ 2011-10-05 18:54 UTC (permalink / raw) To: Glenn Morris; +Cc: Stephen Berman, 2025 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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#2025: 23.0.60; emacsclient: frame does not get focus on opening 2011-10-05 18:54 ` Jan Djärv @ 2011-10-05 21:33 ` Glenn Morris 2011-10-05 21:50 ` Chong Yidong 1 sibling, 0 replies; 8+ messages in thread From: Glenn Morris @ 2011-10-05 21:33 UTC (permalink / raw) To: 2025-done tags 2025 notabug wontfix stop It sounds like there is nothing to be done on the Emacs end, so I will close this. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#2025: 23.0.60; emacsclient: frame does not get focus on opening 2011-10-05 18:54 ` Jan Djärv 2011-10-05 21:33 ` Glenn Morris @ 2011-10-05 21:50 ` Chong Yidong 2011-10-05 22:19 ` Stephen Berman 1 sibling, 1 reply; 8+ messages in thread From: Chong Yidong @ 2011-10-05 21:50 UTC (permalink / raw) To: Jan Djärv; +Cc: Stephen Berman, 2025 Jan Djärv <jan.h.d@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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#2025: 23.0.60; emacsclient: frame does not get focus on opening 2011-10-05 21:50 ` Chong Yidong @ 2011-10-05 22:19 ` Stephen Berman 0 siblings, 0 replies; 8+ messages in thread From: Stephen Berman @ 2011-10-05 22:19 UTC (permalink / raw) To: Chong Yidong; +Cc: 2025 On Wed, 05 Oct 2011 17:50:42 -0400 Chong Yidong <cyd@stupidchicken.com> wrote: > Jan Djärv <jan.h.d@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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-10-05 22:19 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-01-24 15:16 bug#2025: 23.0.60; emacsclient: frame does not get focus on opening Stephen Berman 2011-10-05 4:48 ` Glenn Morris 2011-10-05 8:31 ` Stephen Berman 2011-10-05 17:15 ` Glenn Morris 2011-10-05 18:54 ` Jan Djärv 2011-10-05 21:33 ` Glenn Morris 2011-10-05 21:50 ` Chong Yidong 2011-10-05 22:19 ` Stephen Berman
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).