Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphic artifacts (small gray squares) on the desktop when the window is minimized #15219

Open
thomaslevesque opened this issue Apr 21, 2023 · 34 comments
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Milestone

Comments

@thomaslevesque
Copy link

thomaslevesque commented Apr 21, 2023

Windows Terminal version

1.16.10262.0

Windows build number

10.0.22621.1555

Other Software

No response

Steps to reproduce

I'm not sure exactly when it happens. I use WT without issues, and after a while I notice the glitch; not sure what makes it appear. Once it starts appearing, it stays.

Expected Behavior

There should be no graphic artifacts on the desktop when I minimize or restore the window.

Actual Behavior

Whenever I minimize the window, small gray squares appear just above the taskbar:

image

The gray squares are only visible on the desktop. If any window masks that part of the desktop, they don't appear (in other words, they appear below all windows, with the lowest z-index).

Their number seems to match the number of open tabs in WT, although it's a bit inconsistent.

When I restore the window, I see just one small gray square in the top left corner of the screen:

image

It also appears below all windows except the WT window (i.e. when the WT window is maximized I still see the square in its top-left corner, but any other window masks it).

@thomaslevesque thomaslevesque added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 21, 2023
@DHowett
Copy link
Member

DHowett commented Apr 21, 2023

Hey, do you happen to have "mica4all" or "mica everywhere" (I can't remember the name!) installed?

@thomaslevesque
Copy link
Author

@DHowett no, never heard of it.

@carlos-zamora carlos-zamora added Product-Terminal The new Windows Terminal. Priority-2 A description (P2) Area-Windowing Window frame, quake mode, tearout and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 26, 2023
@carlos-zamora carlos-zamora added this to the Terminal v1.18 milestone Apr 26, 2023
@ClaireCJS

This comment was marked as off-topic.

@thomaslevesque
Copy link
Author

Not exactly. I just see small grey squares, not rectangles like in your screenshot. Might be related, though.
(haven't seen this in a while btw, maybe it's been fixed?)

@ClaireCJS

This comment was marked as off-topic.

@zadjii-msft
Copy link
Member

If someone's still seeing this regularly, it might be helpful to know what the actual window class for that window is (with like, spyxx or winspy). I'd guess that it's either:

  • PseudoConsoleWindow
  • DesktopWindowXamlSource

and which one it is would really change my theory of the root cause.

Also, knowing what version you're on would also help. If it's a xaml island window (for some reason), then 1.18 probably changed the way this presents itself.

@zadjii-msft zadjii-msft added the Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. label Sep 20, 2023
@zadjii-msft
Copy link
Member

A thought: why are we using WS_OVERLAPPEDWINDOW instead of WS_OVERLAPPED..?

@ClaireCJS

This comment was marked as off-topic.

@zadjii-msft

This comment was marked as off-topic.

@zadjii-msft

This comment was marked as off-topic.

@ClaireCJS

This comment was marked as off-topic.

@ClaireCJS

This comment was marked as off-topic.

@zadjii-msft

This comment was marked as off-topic.

@ClaireCJS

This comment was marked as off-topic.

@zadjii-msft

This comment was marked as off-topic.

@ClaireCJS

This comment was marked as off-topic.

@ClaireCJS

This comment was marked as off-topic.

@zadjii-msft

This comment was marked as off-topic.

@ClaireCJS
Copy link

3072x1728? That's... not even the resolution of the desktop i'm dropping the finder on, it's a 1920x1080 desktop. 3 out of 4 of mine are. It's probably some combination of my 4 displays (31080p + 1VGA).

Yes, it appears that it's missing actually. And I missed that it was missing. oof

@ClaireCJS

This comment was marked as off-topic.

@zadjii-msft
Copy link
Member

Okay, maybe we've been tying two related but ultimately separate things here.

Quick way to separate these out: @ClaireCJS Do you see the same behavior without any tcc.exe tabs? Just a plain-old PowerShell or Command Prompt tab. Let's eliminate one variable here.


We definitely do have reports of the tiny, top-left square without TCC, but this may be exacerbated by it. I'm tempted to switch to

diff --git a/src/interactivity/base/InteractivityFactory.cpp b/src/interactivity/base/InteractivityFactory.cpp
index fe8fc55cd..4e675cb85 100644
--- a/src/interactivity/base/InteractivityFactory.cpp
+++ b/src/interactivity/base/InteractivityFactory.cpp
@@ -330,8 +330,8 @@ using namespace Microsoft::Console::Interactivity;
                 // will return the console handle again, not the owning
                 // terminal's handle. It's not entirely clear why, but WS_POPUP
                 // is absolutely vital for this to work correctly.
-                const auto windowStyle = WS_OVERLAPPEDWINDOW | WS_POPUP;
-                const auto exStyles = WS_EX_TOOLWINDOW | WS_EX_TRANSPARENT | WS_EX_LAYERED | WS_EX_NOACTIVATE;
+                const auto windowStyle = WS_OVERLAPPED | WS_POPUP;^M
+                const auto exStyles = WS_EX_TRANSPARENT | WS_EX_LAYERED | WS_EX_NOACTIVATE;^M

                 // Attempt to create window.
                 hwnd = CreateWindowExW(exStyles,

But I need to sync with my user32 contact before I'd feel comfortable with that. It seems to remove the size when it's restored (the tiny rectangle), but not the tiny one....

@ClaireCJS

This comment was marked as off-topic.

@zadjii-msft

This comment was marked as off-topic.

@zadjii-msft
Copy link
Member

zadjii-msft commented Sep 26, 2023

How did I miss

(haven't seen this in a while btw, maybe it's been fixed?)

Well then. I'm going to tenuously mark this Fixed?, and give the community till the end of 1.20 to find a repro. If we don't hear anything, I'm gonna go ahead and say this was magically fixed along the way.

If anyone DOES end up with a repro for this specifically1, then a Task Manager dump of OpenConsole.exe (NOT WindowsTerminal.exe) might be enlightening.

Footnotes

  1. not the TCC thing tracked in impossible-to-move white boxes drawn all over taskbar and on desktop, outside of windows terminal #15536

@thomaslevesque
Copy link
Author

Sounds good to me. If I see it again, I'll let you know.

@ShakoFarhad
Copy link

ShakoFarhad commented Jan 19, 2024

This happens concistently still for me. I have reformatted and reinstalled windows 11 several times (Windows 11 Pro) on a modern and powerful laptop from Lenovo. I did not experience this on my previous laptop which was a Windows Surface Book 2.

Windows terminal:
Version: 1.18.3181.0

Laptop info:
Processor13th Gen Intel(R) Core(TM) i9-13905H 2.60 GHz
Installed RAM 64,0 GB
Version Windows 11 Pro
Version 23H2
Installed on ‎06.‎01.‎2024
Operating system build 22631.3007
Experience Windows Feature Experience Pack 1000.22681.1000.0

I have noticed these squares appear in the same way as described above after WSL ubuntu terminal being open over night or just over a long period of time. I noticed that the squares dissappear after restarting the PC. Once I noticed the squares dissappeared after running "wsl" in powershell as it seemed like WSL had turned itself off over night. Perhaps the root cause is WSL not gracefully shutting down while terminal windows are still open and the laptop is hibernation mode.

If possible, tell me if there is anything I can do to fix this.

EDIT: I will update this comment or make a new one when it happens again with the task manager dump. If possible, give me a step by step on how to do that if it is something specific as I have not done that before.

EDIT 2: I generated a DMP file for windows terminal when the squares returned again. It is 900 mb. What is the best way to share this info?

@zadjii-msft
Copy link
Member

@ShakoFarhad Sorry I missed that! You should be able to share that with the team following these steps: https://github.com/microsoft/terminal/wiki/Troubleshooting-Tips#share-with-the-team

Is it a dump of windowsterminal.exe, or openconsole.exe? We're pretty confident the squares are due to openconsole.exe, (which Terminal uses)

@zadjii-msft zadjii-msft modified the milestones: Terminal v1.20, Backlog Feb 7, 2024
@thomaslevesque
Copy link
Author

Seeing this again, for the first time in a while:
image

If anyone DOES end up with a repro for this specifically1, then a Task Manager dump of OpenConsole.exe (NOT WindowsTerminal.exe) might be enlightening.

Which one? I have 4 instances of OpenConsole.exe

@jonasmarco
Copy link

image

07/31/2024

@zadjii-msft
Copy link
Member

I'm pretty sure that #17828 wasn't ultimately related to this, but can someone try out the latest Terminal Canary (>=1.23.2421.0) and see if that fixed this?

You can grab terminal canary from aka.ms/terminal-canary-installer

@Lukiticas
Copy link

Image
same here 28/10/2024

@DHowett
Copy link
Member

DHowett commented Oct 28, 2024

same here 28/10/2024

Are you using Preview or Stable? Which version exactly?

@Lukiticas
Copy link

same here 28/10/2024

Are you using Preview or Stable? Which version exactly?

sorry for the late response, Stable, version 1.21.2911.0, win11 23H2 latest patch

@kovalexal
Copy link

Still happening for me in Stable, version 1.21.3231.0, win11 24H2. Are there any resolutions that might work (at least as a temporary solution)?

It's a pity to change a terminal application because of a single bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

9 participants