Terminal loses focus on launch #16367

Open
opened 2026-01-31 05:05:28 +00:00 by claunia · 0 comments
Owner

Originally created by @amzon-ex on GitHub (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

https://user-images.githubusercontent.com/45428344/148919242-64b1f67d-94e9-46dc-9de4-74189e45d0bd.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.

Originally created by @amzon-ex on GitHub (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 https://user-images.githubusercontent.com/45428344/148919242-64b1f67d-94e9-46dc-9de4-74189e45d0bd.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.
claunia added the Resolution-ExternalNeeds-Tag-Fix labels 2026-01-31 05:05:28 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16367