microsoft / microsoft/vscode

Unable to return multiple window titles for windows across multiple screens / desktops

Open
#331,000 2 comments 0 reactions 1 assignee Claimed by @benibenj View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Does this issue occur when all extensions are disabled?: Yes

- VS Code Version: 1.133.0
a5b500951314efd502d07465bd138dfbd714a960
x64
- OS Version: Microsoft Windows 10.0.26200

Steps to Reproduce:

1. Have multiple open VSCode windows, across screens and virtual desktops
2. Try and collect information on them using the following in PowerShell 7.6.5
```powershell
Install-PSResource VirtualDesktop
Import-Module VirtualDesktop
Get-Process |
Where-Object {$_.MainWindowTitle -and $_.ProcessName -ne 'TextInputHost' -and $_.ProcessName -ne 'ApplicationFrameHost'} |
Select-Object @{N='DesktopName';Expression = {Get-DesktopName (Get-DesktopFromWindow -Hwnd $_.MainWindowHandle)}},
@{N='DesktopNumber';Expression = {Get-DesktopIndex (Get-DesktopFromWindow -Hwnd $_.MainWindowHandle)}},
ProcessName,MainWindowHandle,MainWindowTitle,id | Format-Table
```

This only returns the most recently active window, not all open & visible windows across different desktops.

This is likely a deeper Windows/dotnet issue and this prevents me in gaining useful data about what I'm working on whilst also crucially impacts me being able to accurately detail in blogs about what I am listening to, reading or watching whilst I am in the authoring process.

I have opened a similar bug for [Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=2063041)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.