Proposal
When the clock is minimized or started hidden, Windows may show a stale Alt+Tab/taskbar preview captured at the time the window was minimized. Keeping the internal timer running does not necessarily update that preview because DWM often uses a cached minimized-window bitmap.
Add support for custom DWM iconic thumbnails while the window is minimized. The app should render the current clock text into a bitmap and provide it to Windows through the DWM preview APIs, then invalidate that bitmap when the clock text changes.
Why
Users may reasonably expect the minimized preview to show the current clock, especially now that the app keeps updating while hidden or minimized. Without a custom preview, the app’s internal state can be correct while Windows still displays old clock text, making it look like the clock is stuck.
Implementation Notes
Use DWMWA_HAS_ICONIC_BITMAP and DWMWA_FORCE_ICONIC_REPRESENTATION, handle WM_DWMSENDICONICTHUMBNAIL / WM_DWMSENDICONICLIVEPREVIEWBITMAP, render the current clock text to a bitmap, and call DwmInvalidateIconicBitmaps when the displayed time changes while minimized.
Keep this separate from timer lifecycle work because it requires native interop, DPI handling, bitmap sizing, and visual verification on Windows.
Proposal
When the clock is minimized or started hidden, Windows may show a stale Alt+Tab/taskbar preview captured at the time the window was minimized. Keeping the internal timer running does not necessarily update that preview because DWM often uses a cached minimized-window bitmap.
Add support for custom DWM iconic thumbnails while the window is minimized. The app should render the current clock text into a bitmap and provide it to Windows through the DWM preview APIs, then invalidate that bitmap when the clock text changes.
Why
Users may reasonably expect the minimized preview to show the current clock, especially now that the app keeps updating while hidden or minimized. Without a custom preview, the app’s internal state can be correct while Windows still displays old clock text, making it look like the clock is stuck.
Implementation Notes
Use
DWMWA_HAS_ICONIC_BITMAPandDWMWA_FORCE_ICONIC_REPRESENTATION, handleWM_DWMSENDICONICTHUMBNAIL/WM_DWMSENDICONICLIVEPREVIEWBITMAP, render the current clock text to a bitmap, and callDwmInvalidateIconicBitmapswhen the displayed time changes while minimized.Keep this separate from timer lifecycle work because it requires native interop, DPI handling, bitmap sizing, and visual verification on Windows.