emacs holding focus, not granting it to xterm

Oliver Schmidt oschmidt-mailinglists@gmx.de
Sun Jun 29 13:52:00 GMT 2014


On 6/27/2014 11:22 PM, alflanagan wrote:
> The problem occurs when I run emacsclient to connect to an existing instance
> of emacs; the file shows up in emacs and emacsclient exits as expected, but
> focus remains "stuck" in emacs for some time.

I tried the following to reproduce the problem:

Under Cygwin X Server Version 1.15.1-3:

1.) Start an xterm under cygwin with xserver in multiwindow mode.
2.) From this cygwin xterm log into remote linux (debian 3.2.0-4-486) machine with "ssh -X".
3.) After logged in to the remote linux machine: start emacs with "emacs &". This opens a new X11 window under cygwin X server which is on top and has keyboard focus.
4.) In Emacs Window type the key combination Alt+X and then "server-start"
5.) Go back to xterm window and type: "emacsclient <filename> &" to edit the file <filename> in the emacs-server.
6.) Now: all typing goes inte the emacs X11 window, although this window is in the background (it might even be not visible if it is behind other windows).

It turns out that the above behaviour is the known problem that windows are not raised from the Cygwin X Server in multiwindow mode, if a program wants to programmatically activate a window as reported in http://www.cygwin.com/ml/cygwin-xfree/2005-06/msg00072.html .

If I start a modified xserver with my patch applied from https://cygwin.com/ml/cygwin-xfree/2011-08/msg00034.html the following happens in step 6:

6'.) the emacs window is raised to the top over all windows and gets the keyboard focus.

I think that 6'.) is the expected behaviour because this also happens if running under a x server on a  linux machine instead of cygwin.

Best regards,
Oliver


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/



More information about the Cygwin-xfree mailing list