microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.68k stars 8.19k forks source link

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

Open TuxTom opened 10 months ago

TuxTom commented 10 months ago

Windows Terminal version

1.19.2831.0

Windows build number

10.0.19045.0

Other Software

No response

Steps to reproduce

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.

TuxTom commented 10 months ago

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

zadjii-msft commented 10 months ago

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).

TuxTom commented 10 months ago

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.

fighur commented 9 months ago

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

TuxTom commented 9 months ago

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".

Jonas1312 commented 9 months ago

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

BADF00D commented 9 months ago

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

guntern commented 9 months ago

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.

4W5ZeZPMc commented 9 months ago

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

erropix commented 7 months ago

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.

DejayRezme commented 7 months ago

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.

PinkPanther901 commented 7 months ago

Also experiencing the exact same thing, FancyZones + WindowsTerminal.

cprusprus commented 6 months ago

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]).

albeec13 commented 5 months ago

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.

dan-hampton commented 5 months ago

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

maaneeack commented 4 months ago

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.

Svish commented 4 months ago

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.