Terminal window does not focus when UWP apps are focused #15684

Closed
opened 2026-01-31 04:45:31 +00:00 by claunia · 9 comments
Owner

Originally created by @r33int on GitHub (Oct 24, 2021).

Windows Terminal version (or Windows build number)

10.0.22000.0 1.11.2921.0

Other Software

No response

Steps to reproduce

  • Use WIndows Terminal as a default terminal (new feature in Windows 11)
  • Open an UWP app and focus its window
  • Run any shell program from Search or Win+R (cmd.exe, powershell.exe)

Expected Behavior

Windows Terminal window should open in the foreground and be focused, as it does when a Win32 window is focused.

Actual Behavior

Windows Terminal opens in the background, and maximizing the window is needed to reveal it. I have attached a video that shows the problem.

https://user-images.githubusercontent.com/22567851/138613233-dc9a7980-049a-4c53-8eec-58388b20651b.mp4

Originally created by @r33int on GitHub (Oct 24, 2021). ### Windows Terminal version (or Windows build number) 10.0.22000.0 1.11.2921.0 ### Other Software _No response_ ### Steps to reproduce - Use WIndows Terminal as a default terminal (new feature in Windows 11) - Open an UWP app and focus its window - Run any shell program from Search or Win+R (cmd.exe, powershell.exe) ### Expected Behavior Windows Terminal window should open in the foreground and be focused, as it does when a Win32 window is focused. ### Actual Behavior Windows Terminal opens in the background, and maximizing the window is needed to reveal it. I have attached a video that shows the problem. https://user-images.githubusercontent.com/22567851/138613233-dc9a7980-049a-4c53-8eec-58388b20651b.mp4
Author
Owner

@zadjii-msft commented on GitHub (Oct 27, 2021):

Hmmm. This doesn't seem to repro on 10.0.22486.1000. This might be a variation on that same run dialog issue we were seeing before. Granted, I'm on an internal build, but I think 10.0.22000 is a little out of date, so updating here might help.

@zadjii-msft commented on GitHub (Oct 27, 2021): Hmmm. This doesn't seem to repro on `10.0.22486.1000`. This might be a variation on that same run dialog issue we were seeing before. Granted, I'm on an internal build, but I think `10.0.22000` is a little out of date, so updating here might help.
Author
Owner

@DHowett commented on GitHub (Oct 27, 2021):

Unfortunately, 10.0.22000 is the latest public Windows 11 version. 22xxx where xxx > 0 is Insiders-only.

@DHowett commented on GitHub (Oct 27, 2021): Unfortunately, 10.0.22000 is the latest public Windows 11 version. 22xxx where xxx > 0 is Insiders-only.
Author
Owner

@r33int commented on GitHub (Oct 27, 2021):

So is this rather an issue with the current Windows 11 builds than with Terminal?

@r33int commented on GitHub (Oct 27, 2021): So is this rather an issue with the current Windows 11 builds than with Terminal?
Author
Owner

@ianjoneill commented on GitHub (Oct 27, 2021):

For what it's worth, I can't repro this on Windows 10.0.22000.258 with terminal 1.11.2921.0.

@ianjoneill commented on GitHub (Oct 27, 2021): For what it's worth, I can't repro this on Windows 10.0.22000.258 with terminal 1.11.2921.0.
Author
Owner

@zadjii-msft commented on GitHub (Oct 27, 2021):

Sorry, I typo'd, I meant 10.0.22000.0. I was under the impression that the (major.minor.build.revision?) revision numbers were still getting bumped for in-market Win11's. This might be #10965

@zadjii-msft commented on GitHub (Oct 27, 2021): Sorry, I typo'd, I meant `10.0.22000.0`. I was under the impression that the (_major.minor.build.revision_?) revision numbers were still getting bumped for in-market Win11's. This might be #10965
Author
Owner

@DHowett commented on GitHub (Oct 27, 2021):

Ah. There's an issue (?) where PowerShell's OSVersion reports .0 when the UBR is actually much higher.

cmd /c ver is perhaps more reliable.

(dhowett-sl) ~ % [System.Environment]::OSVersion

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.22490.0 Microsoft Windows NT 10.0.22490.0

                                ^ oops zero

(dhowett-sl) ~ % cmd /c ver

Microsoft Windows [Version 10.0.22490.1000]
                                      ^^^^ much higher!
@DHowett commented on GitHub (Oct 27, 2021): Ah. There's an issue (?) where PowerShell's `OSVersion` reports .0 when the UBR is actually much higher. `cmd /c ver` is perhaps more reliable. ``` (dhowett-sl) ~ % [System.Environment]::OSVersion Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.22490.0 Microsoft Windows NT 10.0.22490.0 ^ oops zero (dhowett-sl) ~ % cmd /c ver Microsoft Windows [Version 10.0.22490.1000] ^^^^ much higher! ```
Author
Owner

@r33int commented on GitHub (Oct 27, 2021):

Sorry, I typo'd, I meant 10.0.22000.0. I was under the impression that the (major.minor.build.revision?) revision numbers were still getting bumped for in-market Win11's. This might be #10965

This seems to be a similar issue from the one I've filed.

If that can help with reproducing, I am currently running this version:
Microsoft Windows [version 10.0.22000.282].

@r33int commented on GitHub (Oct 27, 2021): > Sorry, I typo'd, I meant `10.0.22000.0`. I was under the impression that the (_major.minor.build.revision_?) revision numbers were still getting bumped for in-market Win11's. This might be #10965 This seems to be a similar issue from the one I've filed. If that can help with reproducing, I am currently running this version: `Microsoft Windows [version 10.0.22000.282]`.
Author
Owner

@zadjii-msft commented on GitHub (Feb 17, 2022):

Hey it's been a few months since this was filed, and hopefully some fixes have flowed out. I can't say for sure, but I suspect if this was in fact the issue we were thinking of, then it should probably have shipped by now. Any chance you're still seeing this on a newer Win11 build?

EDIT: looking at MSFT:35378923, I'm not actually sure that got serviced to in-market Windows 11 versions...

@zadjii-msft commented on GitHub (Feb 17, 2022): Hey it's been a few months since this was filed, and hopefully some fixes have flowed out. I can't say for sure, but I suspect if this was in fact the [issue we were thinking of](https://github.com/microsoft/terminal/issues/11601#issuecomment-953046385), then it should probably have shipped by now. Any chance you're still seeing this on a newer Win11 build? EDIT: looking at MSFT:35378923, I'm not actually sure that got serviced to in-market Windows 11 versions...
Author
Owner

@ghost commented on GitHub (Feb 21, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Feb 21, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15684