Ghost window (DesktopWindowXamlSource) is shown again (see issue #6507) #20686

Closed
opened 2026-01-31 07:21:13 +00:00 by claunia · 17 comments
Owner

Originally created by @TuxTom on GitHub (Oct 17, 2023).

Windows Terminal version

1.19.2831.0

Windows build number

10.0.19045.0

Other Software

No response

Steps to reproduce

  • Open Windows Terminal

Expected Behavior

Just one window being shown in the taskbar/window switcher list.

Actual Behavior

Besides the actual application window, another dummy window with the name "DesktopWindowXamlSource" is shown. When the dummy window is closed, the actual window is also closed.

Originally created by @TuxTom on GitHub (Oct 17, 2023). ### Windows Terminal version 1.19.2831.0 ### Windows build number 10.0.19045.0 ### Other Software _No response_ ### Steps to reproduce - Open Windows Terminal ### Expected Behavior Just one window being shown in the taskbar/window switcher list. ### Actual Behavior Besides the actual application window, another dummy window with the name "DesktopWindowXamlSource" is shown. When the dummy window is closed, the actual window is also closed.
Author
Owner

@TuxTom commented on GitHub (Oct 17, 2023):

I also tried this with Windows Terminal version 1.18.2822.0, I have the same effect.

@TuxTom commented on GitHub (Oct 17, 2023): I also tried this with Windows Terminal version 1.18.2822.0, I have the same effect.
Author
Owner

@zadjii-msft commented on GitHub (Oct 18, 2023):

Huh. I coulda swore this was fixed with #15165.

A possibly dumb question - does this repro on a "cold launch" of the Terminal? Like, there are no other terminal windows running, there's no tray icon, nothing. Just the first, single window? (this would help eliminate window refrigeration as a possible root cause).

@zadjii-msft commented on GitHub (Oct 18, 2023): Huh. I coulda swore this was fixed with #15165. A possibly dumb question - does this repro on a "cold launch" of the Terminal? Like, there are no other terminal windows running, there's no tray icon, nothing. Just the first, single window? (this would help eliminate window refrigeration as a possible root cause).
Author
Owner

@TuxTom commented on GitHub (Oct 20, 2023):

In most of the cases, the ghost window appears immediately when performing a "cold launch" of the terminal. Yet, in some rare cases the ghost window is not shown.

One more observation: I have the application window on the second display, it also appears there when it's launched. In most cases when the ghost window is shown, the window is opened on the second display and the ghost window is also shown in the taskbar of the second display. The taskbar entry for the actual window appears on the first display, though. When I move the application window to the first display and back, the taskbar entry is taken along to the second display.

I even had one case, where no ghost window was shown but the taskbar entry for the application window was still shown on the wrong display.

@TuxTom commented on GitHub (Oct 20, 2023): In most of the cases, the ghost window appears immediately when performing a "cold launch" of the terminal. Yet, in some rare cases the ghost window is not shown. One more observation: I have the application window on the second display, it also appears there when it's launched. In most cases when the ghost window is shown, the window is opened on the second display and the ghost window is also shown in the taskbar of the second display. The taskbar entry for the actual window appears on the first display, though. When I move the application window to the first display and back, the taskbar entry is taken along to the second display. I even had one case, where no ghost window was shown but the taskbar entry for the application window was still shown on the wrong display.
Author
Owner

@fighur commented on GitHub (Oct 25, 2023):

I've also been experiencing this recently. In my case, it seems to happen only when I have FancyZones enabled.

@fighur commented on GitHub (Oct 25, 2023): I've also been experiencing this recently. In my case, it seems to happen only when I have FancyZones enabled.
Author
Owner

@TuxTom commented on GitHub (Oct 26, 2023):

Thanks for bringing this up, @fighur !

I'm also using FancyZones and can confirm that the issue goes away when I disable it. It even seems sufficient to disable the FancyZones option "Move newly created windows to their last known zone".

@TuxTom commented on GitHub (Oct 26, 2023): Thanks for bringing this up, @fighur ! I'm also using FancyZones and can confirm that the issue goes away when I disable it. It even seems sufficient to disable the FancyZones option "Move newly created windows to their last known zone".
Author
Owner

@Jonas1312 commented on GitHub (Oct 26, 2023):

I have the same issue on Windows 10, using Terminal 1.18.2822.0, and I'm using FancyZones too

@Jonas1312 commented on GitHub (Oct 26, 2023): I have the same issue on Windows 10, using Terminal 1.18.2822.0, and I'm using FancyZones too
Author
Owner

@BADF00D commented on GitHub (Nov 10, 2023):

Thanks for bringing this up, @fighur !

I'm also using FancyZones and can confirm that the issue goes away when I disable it. It even seems sufficient to disable the FancyZones option "Move newly created windows to their last known zone".

I can confirm that behavior. Win10 22H2, Window Terminal 1.18.2822.0, PowerToys 0.75.1

@BADF00D commented on GitHub (Nov 10, 2023): > Thanks for bringing this up, @fighur ! > > I'm also using FancyZones and can confirm that the issue goes away when I disable it. It even seems sufficient to disable the FancyZones option "Move newly created windows to their last known zone". I can confirm that behavior. Win10 22H2, Window Terminal 1.18.2822.0, PowerToys 0.75.1
Author
Owner

@guntern commented on GitHub (Nov 10, 2023):

Thanks for bringing this up, @fighur !

I'm also using FancyZones and can confirm that the issue goes away when I disable it. It even seems sufficient to disable the FancyZones option "Move newly created windows to their last known zone".

I also have this issue and can confirm, that disabeling this single fancyzone option is enough to get rid of the ghost window.

@guntern commented on GitHub (Nov 10, 2023): > Thanks for bringing this up, @fighur ! > > I'm also using FancyZones and can confirm that the issue goes away when I disable it. It even seems sufficient to disable the FancyZones option "Move newly created windows to their last known zone". I also have this issue and can confirm, that disabeling this single fancyzone option is enough to get rid of the ghost window.
Author
Owner

@4W5ZeZPMc commented on GitHub (Nov 16, 2023):

Yes, I can confirm that too. The extra window is gone after deactivating the FancyZone option

@4W5ZeZPMc commented on GitHub (Nov 16, 2023): Yes, I can confirm that too. The extra window is gone after deactivating the FancyZone option
Author
Owner

@erropix commented on GitHub (Jan 2, 2024):

Instead of turning off the Power Toys Fancy Zones feature, I just added the terminal process name WindowsTerminal.exe in the excludes field.

image

Or, you can just change the terminal window position or size to unpin it from the screen zones.

Both methods solve the issue.

@erropix commented on GitHub (Jan 2, 2024): Instead of turning off the Power Toys Fancy Zones feature, I just added the terminal process name `WindowsTerminal.exe` in the excludes field. ![image](https://github.com/microsoft/terminal/assets/6576868/cb869cfe-a144-4aab-82a7-c6972c1501cc) Or, you can just change the terminal window position or size to unpin it from the screen zones. Both methods solve the issue.
Author
Owner

@DejayRezme commented on GitHub (Jan 3, 2024):

Both methods solve the issue.

Just to be clear, this does NOT solve the issue. It's a workaround, the bug is still there. Please fix it. I quite like my workflow with fancy zones.

@DejayRezme commented on GitHub (Jan 3, 2024): > Both methods solve the issue. Just to be clear, this does NOT solve the issue. It's a workaround, the bug is still there. Please fix it. I quite like my workflow with fancy zones.
Author
Owner

@PinkPanther901 commented on GitHub (Jan 8, 2024):

Also experiencing the exact same thing, FancyZones + WindowsTerminal.

@PinkPanther901 commented on GitHub (Jan 8, 2024): Also experiencing the exact same thing, FancyZones + WindowsTerminal.
Author
Owner

@cprusprus commented on GitHub (Feb 20, 2024):

I think I have a workaround which can be used for now if someone can confirm. Close all Terminals. In FancyZones, uncheck "move newly created windows to their last known zones", then in Excluded apps put (note no extension) exactly DesktopWindowXamlSource

Then recheck "move newly created windows to their own zones". I haven't had a repro since (I had a reliable one before this workaround where it appears when you open a terminal, then switch to another program in the same zone, then close the terminal, and finally launch a terminal [now it shows the ghost window - i.e. switching to a 2nd program before closing was significant for the repro]).

@cprusprus commented on GitHub (Feb 20, 2024): I think I have a workaround which can be used for now if someone can confirm. Close all Terminals. In FancyZones, uncheck "move newly created windows to their last known zones", then in Excluded apps put (note no extension) exactly DesktopWindowXamlSource Then recheck "move newly created windows to their own zones". I haven't had a repro since (I had a reliable one before this workaround where it appears when you open a terminal, then switch to another program in the same zone, then close the terminal, and finally launch a terminal [now it shows the ghost window - i.e. switching to a 2nd program before closing was significant for the repro]).
Author
Owner

@albeec13 commented on GitHub (Feb 24, 2024):

I think I have a workaround which can be used for now if someone can confirm. Close all Terminals. In FancyZones, uncheck "move newly created windows to their own zones", then in Excluded apps put (note no extension) exactly DeskopWindowXamlSource

Then recheck "move newly created windows to their own zones". I haven't had a repro since (I had a reliable one before this workaround where it appears when you open a terminal, then switch to another program in the same zone, then close the terminal, and finally launch a terminal [now it shows the ghost window - i.e. switching to a 2nd program before closing was significant for the repro]).

Thanks for pointing this out! Just want to note 2 things about your procedure:

  1. There is no box for "Move newly created windows to their own zones". Perhaps you mean, "Move newly created windows to their last known zone"? In any case, I did not uncheck this, and simply adding the exclusion and re-launching Terminal made the problem go away.

  2. You have an important typo above where it says "exactly DeskopWindowXamlSource". Note missing 't' in "Deskop"

That said, simply adding the FancyZones exclusion for "DesktopWindowXamlSource" seems to have fixed the issue for me, but it would be better if it was fixed properly.

@albeec13 commented on GitHub (Feb 24, 2024): > I think I have a workaround which can be used for now if someone can confirm. Close all Terminals. In FancyZones, uncheck "move newly created windows to their own zones", then in Excluded apps put (note no extension) exactly DeskopWindowXamlSource > > Then recheck "move newly created windows to their own zones". I haven't had a repro since (I had a reliable one before this workaround where it appears when you open a terminal, then switch to another program in the same zone, then close the terminal, and finally launch a terminal [now it shows the ghost window - i.e. switching to a 2nd program before closing was significant for the repro]). Thanks for pointing this out! Just want to note 2 things about your procedure: 1) There is no box for "Move newly created windows to their own zones". Perhaps you mean, "Move newly created windows to their last known zone"? In any case, I did not uncheck this, and simply adding the exclusion and re-launching Terminal made the problem go away. 2) You have an important typo above where it says "exactly DeskopWindowXamlSource". Note missing 't' in "Deskop" That said, simply adding the FancyZones exclusion for "DesktopWindowXamlSource" seems to have fixed the issue for me, but it would be better if it was fixed properly.
Author
Owner

@dan-hampton commented on GitHub (Mar 4, 2024):

I have been plagued by this issue for many months. It takes up valuable taskbar space.

PowerToys 0.77, Terminal 1.19.10573.0

image

@dan-hampton commented on GitHub (Mar 4, 2024): I have been plagued by this issue for many months. It takes up valuable taskbar space. PowerToys 0.77, Terminal 1.19.10573.0 ![image](https://github.com/microsoft/terminal/assets/80153931/77da15ed-f7d3-4ab9-bca5-8bd16dd454bb)
Author
Owner

@maaneeack commented on GitHub (Apr 3, 2024):

PowerToys 0.79.0, Terminal 1.19.10573.0, Windows 10 22H2 19045.4046
Adding DesktopWindowXamlSource to FancyZones exclusion seems to work for a workaround

The DesktopWindowXamlSource ghost opens when I launch Terminal fresh from a reboot or closing all other terminal windows/tabs.

@maaneeack commented on GitHub (Apr 3, 2024): PowerToys 0.79.0, Terminal 1.19.10573.0, Windows 10 22H2 19045.4046 Adding DesktopWindowXamlSource to FancyZones exclusion seems to work for a workaround The DesktopWindowXamlSource ghost opens when I launch Terminal fresh from a reboot or closing all other terminal windows/tabs.
Author
Owner

@Svish commented on GitHub (Apr 3, 2024):

Same issue here, very annoying.

The workaround of adding DesktopWindowXamlSource to the Excluded apps of FancyZones seem to have removed it for me as well.

@Svish commented on GitHub (Apr 3, 2024): Same issue here, very annoying. The workaround of adding `DesktopWindowXamlSource` to the Excluded apps of FancyZones seem to have removed it for me as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20686