microsoft / microsoft/terminal
Ghost window (DesktopWindowXamlSource) still appears in the Taskbar (See #6507 - #6861 - #16183 - #15047 - #15165 - #15402)
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version
1.24.250409001-llm (Canary) & 1.23.250314002-preview (Preview) & 1.22.250314001 (Stable)
### Windows build number
Windows 10 - Version 10.0.19045.5608
### Other Software
Microsoft PowerToys is not installed.
### Steps to reproduce
1. Open Windows Terminal
2. Open Settings
3. Click "Compatibility"
4. Enable "Allow Windows Terminal to run in the background" option.
5. Close Windows Terminal
### Expected Behavior
After enabling WT to run in background and on clicking the "Close" icon, no Windows Terminal instance should be shown in the Taskbar.
### Actual Behavior
After enabling WT to run in background and on clicking the "Close" icon, the WT closes but a ghost window of WT called "DesktopWindowXamlSource" still being shown in the taskbar. When the ghost window is closed, the actual window is also closed.
Other Tries
The same procedure have been tried in a clean-state VMware VM and Windows Sandbox and still the same issue occurs.
The issue is occuring whether the installation method was MSIX bundle or Installer or Portable.
The "%LocalAppData%\Microsoft\Windows Terminal" & "%ProgramFiles%\WindowsApps\*WindowsTerminalFolder*" folders have been deleted before trying each method (MSIX bundle or Installer or Portable) to exclude any potential conflicts and ensure clean install.
EDIT: There was another combination of settings that revealed the "DesktopWindowXamlSource". That got pulled out and is being tracked in #18808. It's included as quoted below for convenience.
> While enabling "Compatibility" option in the latest stable release [v1.22.10731.0], the ghost "DesktopWindowXamlSource" window does not appear in taskbar as long as "Startup --> (New Instance Behavior) is set to (Create new window)", otherwise if it set to any of the 2 other options, once WT closes, it can never be opened again until...
> 1. Open "Task Manager"
> 2. search for "Windows Terminal" in "Background Processes"
> 3. End it.
> 4. then open WT again.
> I think this can be opened as an another separate issue, but it is all-related to the ghost "DesktopWindowXamlSource" window.
>
> The "Compatibility" option allows for quick launch of WT, say an average of 0.0800s with "Compatibility" option enabled vs cold launch of 0.3100s with "Compatibility" option disabled vs "%SystemRoot%\system32\cmd.exe" launch of 0.0460s. (Calculated using PassMark AppTimer).
>
> The "Compatibility" option is crucial for smooth experience but unfortunately it is completely fucked up in Stable, Preview & Canary releases.
>
> Please see this [video](https://mega.nz/file/beJUBbZD#1Aqg5TjnPCDXSMnn6lLZyr-HM8Yp0LpjnbX9NwI2T24) for more clarification (The video demonstrate the "Compatibility" & "New Instance Behavior" options conflict on Portable mode only on all releases).
Contributor guide
Research direction
No source files or tests are named. Start by reproducing the issue through Settings > Compatibility > Allow Windows Terminal to run in the background, then review the related issues listed in the report; done means closing Terminal leaves no DesktopWindowXamlSource taskbar entry and preserves the expected background behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100