Repository navigation
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read and agree to the FluentFlyout CLA |
779c7d6 to
424800a
Compare
424800a to
004653d
Compare
004653d to
43ad6d1
Compare
- Add WM_NCHITTEST handler to pass through mouse events outside active widget/visualizer bounds to the underlying taskbar (HTTRANSPARENT) - Calculate widget and visualizer layout regions before showing TaskbarWindow, preventing momentary or persistent full-taskbar hit-test blocking overlay - Initialize TaskbarWindow with empty window region on source initialized and reset to empty region on closed - Detect taskbar resolution/position/DPI geometry changes and invalidate stale automation element and tray handle caches - Forward WM_DISPLAYCHANGE from MainWindow to TaskbarWindow and retry display refresh if monitor list is transiently empty during switch - Clamp widget and visualizer coordinates strictly within valid taskbar boundaries and reject negative region coordinates - Hide TaskbarWindow when no interactive content is active - Prevent full-window region reset on region calculation failure - Guard against empty monitor list during startup and display changes in GetSelectedTaskbarHandle and MonitorUtil (avoids Math.Clamp ArgumentException) - Fix string comparison in checkWindowClass for secondary taskbar detection - Set WidgetCanvas Background to null so empty canvas areas do not capture WPF mouse hit testing
7b6d1d4 to
970119a
Compare
|
Hi @unchihugo, I have rebased this branch onto the latest |
|
Hi @phatMT97, thanks for looking to contribute. I haven't noticed these issues myself when changing DPI, displays, etc. Are there steps to reproduce this issue? Thanks! |
|
Hi @unchihugo, Thanks for following up! These issues are mostly caused by timing edge cases during startup and temporary OS states while the display configuration is changing. Since they depend on transient states, they can be difficult to reproduce consistently. However, similar issues have been reported by multiple users in #701, #573, #892, #1130, and #597. Here is some more detail on the cases covered by this PR: 1. Taskbar becomes unclickable / buttons are blocked during startup (Fixes #701, #391)This can happen when On SetWindowRgn(windowHandle, IntPtr.Zero, true);Passing At the same time, This PR fixes that in a few places:
2. Widget disappears or crashes when monitors are disconnected, switched with Win+P, or wake from sleep (Fixes #573, #892, #597)The display configuration can be in a transient state during these operations. For a short period, Windows may report no monitors at all. On var monitors = Screen.AllScreens;
return monitors[Math.Clamp(targetMonitor, 0, monitors.Length - 1)];When A similar case can happen in Because this exception occurs during the update cycle, the widget can stop updating and disappear. This PR handles the empty state explicitly instead of assuming that at least one monitor or taskbar is always available.
3. Widget can keep stale UI Automation geometry after a DPI or resolution changeThere is also a case where the HWND stays the same while its geometry changes. On However, changing DPI or resolution does not necessarily recreate As a result, This PR replaces The cache is now invalidated when any of these change:
4. Secondary taskbars are not detected correctly with 3+ monitorsThere is also a small issue in the secondary taskbar detection code in StringBuilder className = new(256);
...
if (className.Equals("Shell_SecondaryTrayWnd"))
As a result, secondary taskbars can be missed on setups with three or more monitors. The comparison is changed to use the actual string contents: className.ToString().Equals(
"Shell_SecondaryTrayWnd",
StringComparison.OrdinalIgnoreCase)Overall, these cases come from assuming that the Windows taskbar and display state is always valid and stable. In practice, Windows can temporarily report incomplete display information or leave UI Automation geometry out of date during startup and display transitions. Please let me know if you need any further details or adjustments. |
Summary
Fixes an issue where the Windows taskbar becomes unresponsive / unclickable during startup or display topology changes (multi-monitor, resolution, DPI changes, waking from sleep) when the Taskbar Widget is enabled.
Related Issues
TaskbarWindowcovers the entire taskbar and blocks actions. #391 (TaskbarWindow covers the entire taskbar and blocks actions)Motivation
Sometimes on Windows boot or after display/resolution changes, the taskbar stops responding to clicks (Start menu, taskbar icons, system tray cannot be clicked) until FluentFlyout is closed.
This happens because:
Type of Change
What Changed
Checklist