Skip to content
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

Terminal loses focus on launch #12134

Closed
amzon-ex opened this issue Jan 11, 2022 · 6 comments
Closed

Terminal loses focus on launch #12134

amzon-ex opened this issue Jan 11, 2022 · 6 comments
Labels
Needs-Tag-Fix Doesn't match tag requirements Resolution-External For issues that are outside this codebase

Comments

@amzon-ex
Copy link

amzon-ex commented Jan 11, 2022

Windows Terminal version

1.11.3471.0

Windows build number

10.0.22000.376

Other Software

WSL (Ubuntu-21.10)
oh-my-posh 6.42.4 (just listing - don't know if relevant)

Steps to reproduce

When I start Terminal (my default is set to an Ubuntu 21.10 WSL distro) and WSL is not running (on Win startup or shut down forcibly by wsl --shutdown), after WSL starts and the prompt appears, Terminal loses focus and requires clicking on the window (or Alt-Tabbing) to shift focus again. This problem seems remotely related to #11952 but has nothing to do with Visual Studio.
This problem does not happen when WSL is already running.

It happens irrespective of the method I use to start Terminal, primarily 3:

  • Right-click context menu (example video below)
  • Win+X → I method
  • Using Microsoft Powertoys
_22-01-11_14-45-04.mp4

Expected Behavior

Terminal launches, acquires focus and stays that way until intended to by the user (or some other relevant process).

Actual Behavior

Terminal launches, acquires focus, but loses it on appearance of the prompt when WSL starts from a shutdown state.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jan 11, 2022
@zadjii-msft
Copy link
Member

This sounds like #10050 to me. I bet there's an issue on the WSL issue tracker for this...

@amzon-ex
Copy link
Author

I see microsoft/WSL#2597 and microsoft/WSL#3123 both of which are closed and point to #179 which has been marked as solved, but the issue apparently persists. Is there any other active thread pertaining to this? I see #8720 but it seems a little different, like with all apps. WSL issue tracker seems to redirect back to this repo in many cases.

@zadjii-msft
Copy link
Member

@amzon-ex can you check if disabling Linux GUI support by adding the below to .wslconfig (refer docs.microsoft.com/en-us/windows/wsl/wsl-config#configure-global-options-with-wslconfig)

[wsl2]
guiapplications=false

For linking:

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 11, 2022
@amzon-ex
Copy link
Author

Whoa, that fixes it! (albeit at the sacrifice of GUI app support...)
I'm on WSLg version 1.0.28, which microsoft/wslg#443 seems to refer to as the patch in which the issue there is not reproducible.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 12, 2022
@zadjii-msft
Copy link
Member

Well, I'm glad we've got a beat on the root cause at least. I'd follow up on their repo with that, so they can fix this. Thanks for the confirmation!

/dup microsoft/wslg#443

@ghost
Copy link

ghost commented Jan 12, 2022

Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!

@ghost ghost closed this as completed Jan 12, 2022
@ghost ghost added Resolution-External For issues that are outside this codebase and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Attention The core contributors need to come back around and look at this ASAP. labels Jan 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Resolution-External For issues that are outside this codebase
Projects
None yet
Development

No branches or pull requests

2 participants