Minimize button stays highlighted in minimized-window-preview #11804

Open
opened 2026-01-31 02:57:55 +00:00 by claunia · 5 comments
Owner

Originally created by @pawan-kartik on GitHub (Dec 14, 2020).

Environment

Windows build number: Microsoft Windows NT 10.0.19042.662
Windows Terminal version (if applicable): 1.5.3242.0

Steps to reproduce

  1. Open Windows Terminal.
  2. Click on minimize.
  3. Put your cursor on the Terminal icon in the taskbar to get the application's preview.
  4. Hover your cursor on the preview. You'll see that the minimize button is displayed as clicked and not released.

Expected behavior

Minimize button should be displayed normally.

Actual behavior

Minimize button is being displayed as clicked but not released.

Originally created by @pawan-kartik on GitHub (Dec 14, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows NT 10.0.19042.662 Windows Terminal version (if applicable): 1.5.3242.0 ``` # Steps to reproduce 1. Open Windows Terminal. 2. Click on minimize. 3. Put your cursor on the Terminal icon in the taskbar to get the application's preview. 4. Hover your cursor on the preview. You'll see that the minimize button is displayed as clicked and not released. # Expected behavior Minimize button should be displayed normally. # Actual behavior Minimize button is being displayed as clicked but not released.
Author
Owner

@DHowett commented on GitHub (Dec 14, 2020):

Looks like Outlook does this too. I'm going to call this P3, since it's not really that big of an issue.

@DHowett commented on GitHub (Dec 14, 2020): Looks like Outlook does this too. I'm going to call this P3, since it's not really that big of an issue.
Author
Owner

@zadjii-msft commented on GitHub (Dec 14, 2020):

I don't disagree that this is a bug... but I just tried Outlook, Edgium, Firefox, VS, and they all display the same behavior. So I almost wonder if this is something fixable at all. I bet that the OS takes a screenshot of the window at the moment the window is minimized, and uses that as the taskbar preview for that Window. So when minimizing, there's not another attempt to paint the window before that screengrab is completed.

At least that's my theory.

@zadjii-msft commented on GitHub (Dec 14, 2020): I don't disagree that this is a bug... but I just tried Outlook, Edgium, Firefox, VS, and they _all_ display the same behavior. So I almost wonder if this is something fixable at all. I bet that the OS takes a screenshot of the window at the moment the window is minimized, and uses that as the taskbar preview for that Window. So when minimizing, there's not another attempt to paint the window before that screengrab is completed. At least that's my theory.
Author
Owner

@pawan-kartik commented on GitHub (Dec 14, 2020):

@zadjii-msft Your theory sounds fair and reasonable. But I just tried the same with File Explorer, Control panel and Device Manager. This time, the minimize, maximize and close buttons disappear completely in the preview. Is that normal?

@pawan-kartik commented on GitHub (Dec 14, 2020): @zadjii-msft Your theory sounds fair and reasonable. But I just tried the same with File Explorer, Control panel and Device Manager. This time, the minimize, maximize and close buttons disappear completely in the preview. Is that normal?
Author
Owner

@zadjii-msft commented on GitHub (Dec 14, 2020):

I'd assume so. It looks like the window manager only takes a screenshot of the client area. For apps like VS, Outlook, Chrome, they've all got custom content in the titlebar. So for them, the entire titlebar, including the caption buttons, is client area. For things like Explorer, Control Panel - these are using the built-in titlebar. So for them the titlebar isn't part of the client area, and wouldn't be captured.

That's my theory at least.

@zadjii-msft commented on GitHub (Dec 14, 2020): I'd assume so. It looks like the window manager only takes a screenshot of the _client area_. For apps like VS, Outlook, Chrome, they've all got custom content in the titlebar. So for them, the entire titlebar, including the caption buttons, is client area. For things like Explorer, Control Panel - these are using the built-in titlebar. So for them the titlebar isn't part of the client area, and wouldn't be captured. That's my theory at least.
Author
Owner

@zadjii-msft commented on GitHub (Jan 6, 2022):

Debugged this for a bit today. Played with some ideas. I couldn't seem to get this fixed reliably. I thought that 1915a06 fixed this, but that wasn't right at all. It seems to have made this better, but not reliably. It seems like VisualStateManager::GoToState happens async, so we can't be sure when the button has completed the transition to the unclicked state.

Theoretically, we could add a PropertyChanged handler to the VisualStateGroup, and then wait till that enters the released state, and then minimize the window. That might work, but that would also make the button less responsive.

I'm tempted to just close this one as a wont-fix, especially given

  1. the plethora of other applications that experience this issue
  2. the relatively minor impact of the bug
  3. the fact that fixing it might require making the minimize button less responsive (by delaying the minimize after the animation)

I'll leave this open for now, but I'm keen to just close it out if there aren't any clever solutions for it.

@zadjii-msft commented on GitHub (Jan 6, 2022): Debugged this for a bit today. Played with some ideas. I couldn't seem to get this fixed reliably. I thought that 1915a06 fixed this, but that wasn't right at all. It seems to have made this _better_, but not reliably. It seems like `VisualStateManager::GoToState` happens async, so we can't be sure when the button has completed the transition to the unclicked state. Theoretically, we could add a PropertyChanged handler to the VisualStateGroup, and then wait till that enters the released state, and _then_ minimize the window. That might work, but that would also make the button less responsive. I'm tempted to just close this one as a wont-fix, especially given 1. the plethora of other applications that experience this issue 2. the relatively minor impact of the bug 3. the fact that fixing it might require making the minimize button less responsive (by delaying the minimize after the animation) I'll leave this open for now, but I'm keen to just close it out if there aren't any clever solutions for it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11804