Add Tray hover expand mod for hidden icons#4235
Conversation
This mod allows the hidden tray icons flyout to open on hover instead of requiring a click. It includes settings for auto-closing, polling interval, collapse delay, and hit area padding.
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. 2 will become less of an issue once 1 is implemented and the mod becomes isolated. Nice, self-contained UIA approach — it's reversible and doesn't hook the shell. A few integration issues to address before merge. 1. This should be a "tool mod", not injected into Recommended change:
See mods/keep-rainmeter-always-bottom.wh.cpp for a working example (same shape: a worker thread doing cross-process window work, with the launcher boilerplate at the bottom). 2. Thread teardown can orphan the worker and crash on disable. In WaitForSingleObject(g_thread, 3000);
CloseHandle(g_thread);The wait is bounded at 3 s, but you then // create a manual-reset event in Wh_ModInit; signal it in Wh_ModUninit
WaitForSingleObject(g_stopEvent, g_settings.pollInterval); // instead of Sleep()
...
// uninit:
g_running = false;
SetEvent(g_stopEvent);
WaitForSingleObject(g_thread, INFINITE); // safe: the thread can no longer block long
CloseHandle(g_thread);3. Add a screenshot/GIF to the README. This is a visible-effect mod, so a short GIF of the hover-to-expand behavior helps a lot in the catalog. The sibling mod taskbar-tray-show-on-hover embeds one ( Optional improvements
Minor polish — none of this affects users in normal operation, so it's your call.
Functionality notes
Non-critical observations about the feature itself.
|
This mod allows the hidden tray icons flyout to open on hover instead of requiring a click. It includes settings for auto-closing, polling interval, collapse delay, and hit area padding.
It works through UI Automation (no shell function hooks), so it is relatively safe and resilient across Windows builds.
Known limitation: auto-collapse relies on detecting the flyout window class (TopLevelWindowForOverflowXamlIsland by default), which is exposed as a configurable setting in case it differs across Windows builds.
Tested on: Windows 11 25H2 (build 26200.8524)
Changelog
If this pull request updates an existing mod, describe the changes below:
N/A — this pull request introduces a new mod.
Mod authorship
If this pull request introduces a new mod, please complete the section below.
This mod was created by:
Please select the options that best apply. Your selection does not affect the acceptance criteria, but it helps reviewers understand the context of the code and provide relevant feedback.