public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* XWin focus in multiwindow mode
@ 2017-04-14 14:33 Nicolas Goy
  2017-04-21 16:43 ` Jon Turney
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Goy @ 2017-04-14 14:33 UTC (permalink / raw)
  To: cygwin

I noticed that a few apps don't manage focus properly when running under 
XWin.

Summary:
Given a focused X11 app, focusing a native Windows window, the focus is 
not lost in the X11 window.

Steps to reproduce (with terminator):
- Start terminator under XWin with multiwindow window manager
- Focus a Windows window by clicking on it

Expected behavior:
- Focus should be lost from the terminator window

Actual behavior:
- The terminator window remains focused. (by focused I mean that the 
caret remains plain, and the titlebar remains in the focused color, the 
windows properly lose keyboard focus and other OS level focus)
- Also, if I open a menu (in android studio for example), and click a 
Windows window, the menu remains open.

Notes:
If I click another X11 windows, the focus is properly lost. It only 
happens if I pass the focus from an X11 window to a native Windows 
window.

I tested a few X11 app, and not all have this behavior:

Working app:
- xterm
- git-cola
- st
- konsole
- chromium

Apps showing the bug:
- android-studio
- terminator
- gnome-terminal
- termite


Version:

			$ XWin --version 		
			Welcome to the XWin X Server 		
			Vendor: The Cygwin/X Project 		
			Release: 1.19.2.0 		
			OS: CYGWIN_NT-10.0 yoda 2.7.0(0.306/5/3) 2017-02-12 13:18 x86_64 		
			OS: Windows 10  [Windows NT 10.0 build 15063] (Win64) 		
			Package: version 1.19.2-1 built 2017-03-09 		

Started with.
			XWin -multiwindow -clipboard -silent-dup-error -listen tcp 		

--
Nicolas Goy
Programmer


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

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

* Re: XWin focus in multiwindow mode
  2017-04-14 14:33 XWin focus in multiwindow mode Nicolas Goy
@ 2017-04-21 16:43 ` Jon Turney
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Turney @ 2017-04-21 16:43 UTC (permalink / raw)
  To: The Cygwin Mailing List; +Cc: Nicolas Goy

On 14/04/2017 12:23, Nicolas Goy wrote:
> I noticed that a few apps don't manage focus properly when running under
> XWin.
>
> Summary:
> Given a focused X11 app, focusing a native Windows window, the focus is
> not lost in the X11 window.
>
> Steps to reproduce (with terminator):
> - Start terminator under XWin with multiwindow window manager
> - Focus a Windows window by clicking on it
>
> Expected behavior:
> - Focus should be lost from the terminator window
>
> Actual behavior:
> - The terminator window remains focused. (by focused I mean that the
> caret remains plain, and the titlebar remains in the focused color, the
> windows properly lose keyboard focus and other OS level focus)

Thanks for the detailed bug report.

It looks like we were never doing quite the right thing to remove the X 
input focus when losing Windows focus.

I've uploaded xorg-server-1.19.3-1 with a fix for this.

Perhaps you could try that and see if it improves things for you?

> - Also, if I open a menu (in android studio for example), and click a
> Windows window, the menu remains open.

This is also a long standing bug, but is more complex to fix.

At the moment, clicks outside X windows aren't seen by the server at 
all, hence this behaviour.

-- 
Jon Turney
Volunteer Cygwin/X X Server maintainer

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

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

end of thread, other threads:[~2017-04-21 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-14 14:33 XWin focus in multiwindow mode Nicolas Goy
2017-04-21 16:43 ` Jon Turney

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