Q: Can VcXsrv be made to yield focus to windows apps?
Brought to you by:
marha
Is it possible to tell VcXsrv to yield focus to Windows applications when they want to come into the foreground?
A way to reproduce the issue:
C:\Windows\System32\wsl.exe
DISPLAY=:0 sudo apt install terminator && terminator
/mnt/c/Windows/system32/calc.exe
calc.exe
launches in the background while vcxsrv and terminator remains focused. It even blinks on the taskbar indicating that it wanted to get focus.calc.exe
by other means (e.g. from cmd.exe
, from powershell.exe
, from wsl.exe
) without vcxsrv being focused it is able to jump into the foreground as expected.Of course the above are simplified repro steps, my real usecase has to do with launching and/or focusing a code editor, e.g. $EDITOR /path/to/file
I do not think this is a problem of vcxsrv.
If you change the following registry key to 0 and reboot, this does not happen anymore.
HKEY_CURRENT_USER\Control Panel\Desktop\ForegroundLockTimeout
Huh, that's interesting. Thanks for the info, I shall give it a try.
Any idea why cmd.exe and the others behave differently to vcxsrv though?