wt does not give terminal focus if batch scripting is running #21911

Open
opened 2026-01-31 07:58:09 +00:00 by claunia · 0 comments
Owner

Originally created by @michaelmesser on GitHub (Jun 28, 2024).

Windows Terminal version

1.20.11381.0

Windows build number

10.0.22631.3737

Other Software

No response

Steps to reproduce

  1. Close all Windows terminal windows
  2. Make test.cmd with the contents pause
  3. Open test.cmd with Windows terminal
  4. Change focus to a different application like Edge
  5. Press the Windows key and r, then type wt
  6. Moving the mouse back to the edge window may contribute to reproducing this

Expected Behavior

The new terminal window is on top and has focus.

The expected behavior happens if you skip step 3.

Actual Behavior

Sometimes the new terminal window is behind and does not have focus. The terminal icon in the dock is red.

Originally created by @michaelmesser on GitHub (Jun 28, 2024). ### Windows Terminal version 1.20.11381.0 ### Windows build number 10.0.22631.3737 ### Other Software _No response_ ### Steps to reproduce 1. Close all Windows terminal windows 2. Make `test.cmd` with the contents `pause` 3. Open `test.cmd` with Windows terminal 4. Change focus to a different application like Edge 5. Press the Windows key and `r`, then type `wt` 6. Moving the mouse back to the edge window may contribute to reproducing this ### Expected Behavior The new terminal window is on top and has focus. The expected behavior happens if you skip step 3. ### Actual Behavior Sometimes the new terminal window is behind and does not have focus. The terminal icon in the dock is red.
claunia added the Issue-BugResolution-DuplicateProduct-TerminalArea-UserInterface labels 2026-01-31 07:58:10 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21911