public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* emacs holding focus, not granting it to xterm
@ 2014-05-27 11:45 Hans-Georg Scherneck
  2014-06-02 14:00 ` Jon TURNEY
  0 siblings, 1 reply; 5+ messages in thread
From: Hans-Georg Scherneck @ 2014-05-27 11:45 UTC (permalink / raw)
  To: cygwin-xfree

I'm running cygwin x on my laptop [version 1.7.29(0.272/5/3), Windows 7 prof], start windows on
remote machines (cygwin and linux mint), that are exported to my laptop. I've noted the problem for
more than a year now and it's irritating still, new versions of cygwin and applications notwithstanding.

Here's what happens:
I enter text into emacs, move mouse to an xterm, click and enter text there, but text is going into
emacs. I can only move keyboard flow away from emacs after having done some nuisance operations in
the emacs window, like moving around the pointer; it mostly helps with one such instance, sometimes
I have to repeat. It's rather unpredictable. The raised status of the xterm window, however, is
deceiving me. So text goes even into hidden emacs windows.

Vague guess: Something's waiting in emacs to get satisfied so it would release the keyboard
association.

I don't want focus-follows-mouse without a click for focus shift. So I haven't tried this option.
Would expect it wouldn't help. Is there an environment setting that would help? Anything else to get
rid of the glue?

-- 
Med vänliga hälsningar / With best regards yours             -----
Hans-Georg Scherneck                                       /   A   \
---------------------+----------------------------------- |   / \   |
. Telephone & -fax   | Chalmers University of Technology   \       /
. +46 31 772 5556    | Earth and Space Sciences              -----
. +46 31 772 5590 fx | & Onsala Space Observatory             | |
. E-Mail:            | SE-439 92  Onsala, Sweden             /   \
. hgs@chalmers.se    | http://www.chalmers.se/rss       ----------------
. Ocean Loading Serv.| holt.oso.chalmers.se/loading     /===\ ,===//===\
. Gravimeter         | holt.oso.chalmers.se/hgs/SCG    /    /`===,/    /
---------------------+---------------------------------\===//===' \===/


--
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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs holding focus, not granting it to xterm
  2014-05-27 11:45 emacs holding focus, not granting it to xterm Hans-Georg Scherneck
@ 2014-06-02 14:00 ` Jon TURNEY
  2014-06-02 17:49   ` Hans-Georg Scherneck
  0 siblings, 1 reply; 5+ messages in thread
From: Jon TURNEY @ 2014-06-02 14:00 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: hgs

On 27/05/2014 12:45, Hans-Georg Scherneck wrote:
> I'm running cygwin x on my laptop [version 1.7.29(0.272/5/3), Windows 7 prof], start windows on
> remote machines (cygwin and linux mint), that are exported to my laptop. I've noted the problem for
> more than a year now and it's irritating still, new versions of cygwin and applications notwithstanding.
>
> Here's what happens:
> I enter text into emacs, move mouse to an xterm, click and enter text there, but text is going into
> emacs. I can only move keyboard flow away from emacs after having done some nuisance operations in
> the emacs window, like moving around the pointer; it mostly helps with one such instance, sometimes
> I have to repeat. It's rather unpredictable. The raised status of the xterm window, however, is
> deceiving me. So text goes even into hidden emacs windows.

I can't reproduce this.

Can you be a bit more specific about how you are running the X server 
(/var/log/xwin/XWin.0.log would be nice) and which window manager you 
are using?

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs holding focus, not granting it to xterm
  2014-06-02 14:00 ` Jon TURNEY
@ 2014-06-02 17:49   ` Hans-Georg Scherneck
  2014-06-27 21:22     ` alflanagan
  0 siblings, 1 reply; 5+ messages in thread
From: Hans-Georg Scherneck @ 2014-06-02 17:49 UTC (permalink / raw)
  To: cygwin-xfree

Jon TURNEY wrote:
> On 27/05/2014 12:45, Hans-Georg Scherneck wrote:
>> I'm running cygwin x on my laptop [version 1.7.29(0.272/5/3), Windows 7 prof], start windows on
>> remote machines (cygwin and linux mint), that are exported to my laptop. I've noted the problem for
>> more than a year now and it's irritating still, new versions of cygwin and applications
>> notwithstanding.
>>
>> Here's what happens:
>> I enter text into emacs, move mouse to an xterm, click and enter text there, but text is going into
>> emacs. I can only move keyboard flow away from emacs after having done some nuisance operations in
>> the emacs window, like moving around the pointer; it mostly helps with one such instance, sometimes
>> I have to repeat. It's rather unpredictable. The raised status of the xterm window, however, is
>> deceiving me. So text goes even into hidden emacs windows.
>
> I can't reproduce this.
>
> Can you be a bit more specific about how you are running the X server (/var/log/xwin/XWin.0.log
> would be nice) and which window manager you are using?
>
Dear Jon,
you can find the log at http://holt.oso.chalmers.se/hgs/4CYG/XWin.0.log
The X-window manager on the linux machine ? - not sure how to answer.
I log in using ssh -Y and start jobs from an xterm using command lines. I never use any GUI.
uname -a says

    Linux holt 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64
    GNU/Linux

It greets me (ssh, xterm):

    Warning: No xauth data; using fake authentication data for X11 forwarding.
    Welcome to Linux Mint 13 Maya (GNU/Linux 3.2.0-23-generic x86_64)

The problem only occurs with emacs (/usr/bin/emacs23-x  --version says: GNU Emacs 23.3.1 )
Could it be that emacs creates a server / uses a port of its own?
Do you need more information?
Thanks for caring about my problem.
/HGS

-- 
Med vänliga hälsningar / With best regards yours             -----
Hans-Georg Scherneck                                       /   A   \
---------------------+----------------------------------- |   / \   |
. Telephone & -fax   | Chalmers University of Technology   \       /
. +46 31 772 5556    | Earth and Space Sciences              -----
. +46 31 772 5590 fx | & Onsala Space Observatory             | |
. E-Mail:            | SE-439 92  Onsala, Sweden             /   \
. hgs@chalmers.se    | http://www.chalmers.se/rss       ----------------
. Ocean Loading Serv.| holt.oso.chalmers.se/loading     /===\ ,===//===\
. Gravimeter         | holt.oso.chalmers.se/hgs/SCG    /    /`===,/    /
---------------------+---------------------------------\===//===' \===/


--
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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs holding focus, not granting it to xterm
  2014-06-02 17:49   ` Hans-Georg Scherneck
@ 2014-06-27 21:22     ` alflanagan
  2014-06-29 13:52       ` Oliver Schmidt
  0 siblings, 1 reply; 5+ messages in thread
From: alflanagan @ 2014-06-27 21:22 UTC (permalink / raw)
  To: cygwin-xfree

Brief note to demonstrate that Scherneck is not alone:

>> I'm running cygwin x on my laptop [version 1.7.29(0.272/5/3), Windows 7
>> prof], start windows on 
>> remote machines (cygwin and linux mint), that are exported to my laptop.
>> I've noted the problem for 
>> more than a year now and it's irritating still, new versions of cygwin
>> and applications 
>> notwithstanding. 

I'm seeing an identical phenomenon on a Dell laptop* running Win 7
Professional, SP 1; X Server is 1.15.1 (i686-pc-cygwin). Remote system is a
CentOS 5.6 box, and I'm connecting with "ssh -XY user@hostname". I'm running
gnome-terminal and launching emacs 24.3 from there. I'll see if I can find
somewhere to post the log file.

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.

*laptop is running BIOS A13, with HD Graphics 4000, in case it matters.



--
View this message in context: http://cygwin.1069669.n5.nabble.com/emacs-holding-focus-not-granting-it-to-xterm-tp108889p109599.html
Sent from the cygwin-xfree mailing list archive at Nabble.com.

--
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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs holding focus, not granting it to xterm
  2014-06-27 21:22     ` alflanagan
@ 2014-06-29 13:52       ` Oliver Schmidt
  0 siblings, 0 replies; 5+ messages in thread
From: Oliver Schmidt @ 2014-06-29 13:52 UTC (permalink / raw)
  To: cygwin-xfree

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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-29 13:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-27 11:45 emacs holding focus, not granting it to xterm Hans-Georg Scherneck
2014-06-02 14:00 ` Jon TURNEY
2014-06-02 17:49   ` Hans-Georg Scherneck
2014-06-27 21:22     ` alflanagan
2014-06-29 13:52       ` Oliver Schmidt

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).