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
- Open Windows Terminal
- Open Settings
- Click "Compatibility"
- Enable "Allow Windows Terminal to run in the background" option.
- 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...
- Open "Task Manager"
- search for "Windows Terminal" in "Background Processes"
- End it.
- 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 for more clarification (The video demonstrate the "Compatibility" & "New Instance Behavior" options conflict on Portable mode only on all releases).