Add taskbar media widget#4642
Conversation
Submission reviewNote: This review was done by Claude, and then refined manually. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. The main point to address is the overlaps with existing mods, mainly Taskbar Fluent Media Player which is actively maintained. Please explain which features your mod adds that Taskbar Fluent Media Player is missing, and let's discuss whether it'd be better to add them to Taskbar Fluent Media Player instead. See also: 1. Substantial overlap with existing mods. A Fluent-styled taskbar media widget (track info + artwork + playback controls) already exists more than once:
The maintainer's strong preference is to extend an existing mod (add an option, or PR the original author's repo) rather than merge a near-duplicate. This mod's differentiators (hover seek preview, idle app launchers, artwork-derived tinting) are real but not clearly enough to justify a fourth media widget on its own. Please state in the PR how it meaningfully differs from the above and why it can't be an option/contribution to one of them; if the delta is thin, consider consolidating. 2. This should be a "mods as tools" mod, not injected into
Dynamic Island for Windows is direct precedent — the same kind of taskbar media overlay implemented as a tool mod ( 3. The window class is never unregistered — breaks on reload / risks a crash. void Wh_ModUninit() {
...
if (g_widgetThread.joinable()) g_widgetThread.join();
UnregisterClassW(L"WindhawkTaskbarMediaWidget", GetModuleHandle(nullptr));
...
}4. Global std::thread* g_widgetThread = nullptr;
// init: g_widgetThread = new std::thread(WidgetThread);
// uninit: if (g_widgetThread->joinable()) g_widgetThread->join();
// delete g_widgetThread; g_widgetThread = nullptr;The same "global with a non-trivial destructor" caveat applies to 5. // Wh_ModSettingsChanged (arbitrary thread):
if (g_widgetWnd) PostMessage(g_widgetWnd, WM_APP_RELOAD_SETTINGS, 0, 0);
// WidgetWndProc handles WM_APP_RELOAD_SETTINGS on the owning thread.That also fixes the cross-thread 6. Continuous 30 fps redraw even when nothing is animating. The 7. Non-English default settings. User-facing defaults should be English. The default 8. Add a screenshot/GIF to the README. This is a highly visual mod but the README has no image. Please add a screenshot or short GIF (only Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behavior itself.
|
Adds a compact Windows taskbar media widget that reads metadata and controls playback through Global System Media Transport Controls.
Features:
Checked locally with Windhawk clang syntax and object compilation.