-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New session loses focus on startup (WSL issue) #329
Comments
Does it also happen if you start wsltty the "regular" way? (e.g. via desktop shortcut, or from the Start Menu) |
Sounds as if being related to mintty/mintty#1113 but more analysis is needed, as that issue was assumedly fixed. Do you type anything quickly after starting wsltty? |
There were some 'focus' related issue in GUI part of WSL2 also, see https://github.com/microsoft/WSLg/issues?q=is%3Aissue+is%3Aopen+focus. Make sure if the issue can be reproduced after disabling GUI feature with WSL2. |
I am starting wsltty from shortcut. The path I posted originally is that of the shortcut. Wherever focus goes, it is not back to the window that had focus immediately before. |
I don't really understand the question. I start a terminal session because I want to start typing, but I can't because I have to manually set focus first. I don't recall ever having to do this before. |
How would I do that? |
Add the following lines in [wsl2]
guiApplications=false More info https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconfig |
Thanks. That does indeed fix the issue. And as I am still able to run gitk I wonder if, as I am running Windows 10, there is a downside. |
Can you see the issue with wsl.exe when those lines are not present in .wslconfig file? |
Yes. Without |
So, this does not look like mintty/wsltty issue, right? You can see those issues in wslg repository. |
Seems fair. |
Windows 10 Pro 22H2 Build 19045.2604
wsltty 3.6.1.2
Every so often, but not all the time, when I start a new session the newly opened window does not have focus.
The problem doesn't occur every time I start a wsltty session, but these steps seem to be repeatable:
wsl --shutdown
%LOCALAPPDATA%\wsltty\bin\mintty.exe --WSL="Ubuntu" --configdir="%APPDATA%\wsltty" -~ -
Actual result: A new wsltty window appears, but the window does not have focus.
Expected result: the new window has focus on opening.
The text was updated successfully, but these errors were encountered: