Update taskbar-scroll-actions.wh.cpp - #71
Conversation
|
Pushed an updated version to the previous update: Features:
Details:Multi-Tray Bridge Union: Updated GetNotificationAreaRect to dynamically loop through all DesktopWindowContentBridge instances on secondary taskbars and compute their bounding union (UnionRect). This creates a single bounding box that correctly encompasses both the native clock and the extra multi-tray icons. The layout fallback calculation was also expanded from 50 to 150 pixels for broader compatibility. Scroll Event Filtering: Integrated GetAsyncKeyState inside OnMouseWheel to evaluate the active state of configured modifier keys (VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN) before executing any scroll commands, bypassing the action if the requirement isn't met. Monitor Index Enumeration: Implemented a new GetMonitorIndexForMonitor helper utilizing EnumDisplayMonitors to map physical HMONITOR handles to user-configurable numerical indices. This allows OnMouseWheel to accurately restrict scroll events to the specific monitor index configured in the settings array. |
|
The scope of the changes is larger than I initially thought. After considering it, I decided that it'd be better to have it submitted as a separate PR. Please update and reopen ramensoftware/windhawk-mods#4523 and I'll review it. |
Features:
Details:
Software Dimming Engine: Added threaded software dimming functionality (SetSoftwareDimBrightness) that intercepts AdjustBrightnessDdcCi. It tracks combined brightness states per physical monitor, clamping to minimum hardware levels (e.g., 0 DDC/CI) while scaling software overlays seamlessly down to -100.
WMI Fallback: Added graceful software dimming fallback logic in AdjustBrightnessThread when native hardware brightness is unavailable.
Brightness OSD: Implemented BrightnessOsdWndProc to draw a layered (WS_EX_LAYERED), transparent, un-activated window that renders text via GDI (DrawText). The OSD automatically hides via a configurable timer (BrightnessOsdTimerProc).
Thread Management: Instantiated and safely managed a new thread g_pSwDimThread in Wh_ModInit and Wh_ModUninit to handle software dimming message loops without blocking the main UI.
Settings Added: Exposed softwareDimming, brightnessOsd, and brightnessOsdDelay (default: 1500ms) to global settings.