Conversation
Cinabutts
added a commit
to Cinabutts/windhawk-mods
that referenced
this pull request
Jan 7, 2026
**Major Changes:** 1. **Window Subclassing System Overhaul (Comments ramensoftware#1, ramensoftware#10)** - Replaced `SetWindowLongPtrW` with `WindhawkUtils::SetWindowSubclassFromAnyThread` for all window subclassing - Removed fallback ListView subclassing (it was unnecessary since SHELLDLL_DefView handles input properly) - Added proper cleanup with `RemoveWindowSubclassFromAnyThread` in WM_NCDESTROY handlers - Updated function signatures to use `DefSubclassProc` instead of `CallWindowProcW` 2. **Process Isolation (Comments ramensoftware#4, ramensoftware#6)** - Added `IsWindowInCurrentProcess()` helper function - Now verifies ListView and ShellView belong to current explorer.exe process - Prevents mod from affecting other explorer processes 3. **Settings API Fixes (Comments ramensoftware#2, ramensoftware#3)** - Fixed `Wh_GetIntSetting` calls to use single argument (removed incorrect TRUE parameter) - Added `Wh_FreeStringSetting` to properly free string memory - Changed settings structure to nested `modifierKeys` object (matches Windhawk patterns) 4. **Initialization Improvements (Comments ramensoftware#7, ramensoftware#8)** - Removed `Sleep(2000)` hack from `Wh_ModAfterInit` - Removed unnecessary `bInitialized` flag - Added `EnsureValidListView()` helper for dynamic ListView validation - ListView now re-discovered on-demand if window becomes invalid 5. **Code Cleanup (Comments ramensoftware#5, ramensoftware#9)** - Removed redundant `RestoreIconsToVisible` call from `Wh_ModBeforeUninit` (already in Wh_ModUninit) - Added null checks and proper error handling throughout - Added `ToUpperCase()` helper for case-insensitive key matching **Additional Improvements:** - Added `<commctrl.h>` and `<windhawk_utils.h>` includes - Added `--optimize=0 --debug` compiler options - Enhanced documentation in readme with modifier key details - Better logging and error messages throughout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2