Skip to content

Conversation

@learn-more
Copy link
Contributor

No description provided.

@m417z
Copy link
Member

m417z commented Apr 20, 2022

Thanks, but I'm not sure about this change. The idea was that the Program Data folder structure is an implementation detail, and if you want to get the mod source code, the easiest way is to open Windhawk, edit the mod and copy the code. For now, I'll wait for more users to submit mods and gather some more feedback. This will help me understand what users do and clarify the readme and/or improve the program accordingly. This also applies to your suggestion to add a button to open the mod file in explorer.

@learn-more learn-more closed this Apr 21, 2022
@learn-more learn-more deleted the mod-location branch May 12, 2022 19:13
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants