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

Closed
opened 2026-01-31 07:58:12 +00:00 by claunia · 3 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:13 +00:00
Author
Owner

@carlos-zamora commented on GitHub (Jul 17, 2024):

Possibly related: #15763

@carlos-zamora commented on GitHub (Jul 17, 2024): Possibly related: #15763
Author
Owner

@carlos-zamora commented on GitHub (Jul 24, 2024):

We're going to mark this as a /dup of #15763, but we copied over the contents to that thread since you gave us a nice repro. Thanks 😊

@carlos-zamora commented on GitHub (Jul 24, 2024): We're going to mark this as a /dup of #15763, but we copied over the contents to that thread since you gave us a nice repro. Thanks 😊
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Jul 24, 2024):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Jul 24, 2024): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21913