terminal
terminal copied to clipboard
New window is opened in background
Windows Terminal version
1.18.1462.0
Windows build number
10.0.22621.0
Other Software
No response
Steps to reproduce
- Open File Explorer, place it on the screen so that new Windows Terminal window must open over it.
- On address bar of File Explorer, write
wtand press Enter. - New Windows Terminal window opens in front of other windows and gets focus.
- Switch back to File Explorer's address bar, write
wtand press Enter. - New Windows Terminal window opens in front of other windows and gets focus.
- Click on the first Windows Terminal window's title bar.
- Switch back to File Explorer's address bar, write
wtand press Enter. - Observe that the Windows Terminal window is opened in background (not over File Explorer, but below it), has blinking cursor like it has focus, but it does not have focus.
Expected Behavior
The new window is opened in foreground and gets focus.
Actual Behavior
The new window is not a foreground window and does not have focus.
The new window is opened in foreground as long as you do not click on any previously opened window. When you do, next Windows Terminal window (and any further) opens in background.
Hey! Thanks for the report. This appears to be /duplicate of #15763. 🙂
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!
Hey! Thanks for the report. This appears to be /duplicate of #15763. 🙂
@lhecker I do not have problem with Alt-Tab. I have problem with the window opened in background. I do not think this is a duplicate.
Oh you're right. (Although I do think they're related.) But there are multiple other reports of this issue like for instance #13130. I think something's wrong with bringing packaged applications (AppX/MSIX) to the foreground in general. Internally Windows is littered with special handlings for packaged applications throughout the code base so it at least wouldn't be entirely surprising to me if it deviated from the behavior of regular applications.
This issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes.
I didn't notice that this issue was closed again. I'll reopen it. I don't really think it's the exact same issue as the other one...
This is the "wt.exe should probably AllowSetForeground / CoAllowSetForeground on the monarch" thing.
I ahve been having this issue for a couple weeks too now. I'm opening the Windows Terminal by pressing the Win button to open the start menu and type "Terminal". I think the problem occurs if the Windows Terminal app is pinned to the task bar.
EDIT: This is incorrect.
I'm having the same issue, not related to pinned task bar here. I'm starting wt.exe using an autohotkey script. Terminal windows randomly appears in background.
@willuhn you're correct, after working for a while I just had the same issue again.
Its always appearing on the background for me, I do not like that at all
I too have this issue.
In my case I use PowerToys Keyboard Manager to launch C:\Users\USER\AppData\Local\Microsoft\WindowsApps\wt.exe
I do not have Terminal pinned to the taskbar, and it happens to the first create Window, not just any subsequent ones.
Here's my launch settings, in case that matters:
(EDIT: I am currently running version 1.19.10573.0. I believe that was also the case when I originally commented.)
I used to have this issue until I updated to 1.19.10821.0 via Winget. From memory, I used Microsoft Store to get WT at first. I open WT via the context menu (right click → t) and a shortcut on my desktop mapped to a keybind. I'm on Windows 10 22H2 build 19045.4170. I feel like this issue is either contextual (the fix seems to persist through restarts though) or resolved.
Have version 1.19.10821.0 installed thro Microsoft Store and it has been happening for months. Still happening
Doesn't matter how I open terminal, always goes to background
fwiw I can't repro this on 10.0.26282.5000 & 1.23.2391.0. This may have been fixed by #17368 in 1.22 Preview - can anyone confirm/?
Yeah! I can confirm it works for me with version 1.21.1772.0 on Win 11 22631.4112.
fwiw I can't repro this on
10.0.26282.5000&1.23.2391.0. This may have been fixed by #17368 in 1.22 Preview - can anyone confirm/?
I am on version which you have not mentioned, which is really strange, but with 1.21.1772.0 it works for me. I tried exactly the repro steps and also my usual work flow, it works. It might be working for longer time, I just have not noticed it.
Works for me, closing.