-
Notifications
You must be signed in to change notification settings - Fork 310
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
WSL VM boot up steals focus from the foreground app #1212
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Closed similar issues:
|
As wsl is a background service, it shouldn't steal focus when starting up. |
This is most likely caused by wslg, transferring. |
@tusharsnx, would you please collect log and share with us? thanks!
|
@hideyukn88 I am using Windows 11 23H2 on two systems. Could reproduce that issue on both system this afternoon. On one system, I had the impression that when the focus got lost, the language selector (the Now, I cannot reproduce this behavior on either system. Will update this issue with traces if it occurs again. |
@hideyukn88 TBH, I couldn't reproduce it at the moment, but I do see it sometimes. I think after I created this issue the severity has gone down a little. Previously, I used to see it at every wsl boot, but now seems like it only happens at the first wsl boot up after the system is restarted. I'm also on the latest pre-release version, so maybe something was fixed between this version and the earlier versions. I'll try to submit the trace if I see it again. For now, since bersbersbers can repro it, I should keep it open? |
Okay, I've got a perfect repro. When I'm debugging any application and run Steps to repro:
#include <iostream>
int main() {
std::cout << "hello world";
// I tried to put a breakpoint to keep the program running,
// but that doesn't repro the issue.
// So, it seems like program must be in running state,
// which we do by blocking on cin.get().
std::cin.get();
return 0;
}
Trace:I repeated the step (5) 3 times. foregroundTracing.zip
@bersbersbers You're right, I just realized that too (I usually have my taskbar autohide so I couldn't notice it earlier) you can see in the repro video 😄 |
Windows Version
Microsoft Windows [Version 10.0.22631.3235]
WSL Version
2.1.4.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.146.1-2
Distro Version
No response
Other Software
No response
Repro Steps
wsl --shutdown
.wsl
This repros on VScode and Visual Studio integrated terminals, and Windows Terminal also.
Expected Behavior
Focus is still on the foreground (terminal) app.
Actual Behavior
Focus is lost from the foreground app.
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: