Add Mod: Hide From Screencapture#4728
Conversation
Renamed file to match id in mod metadata
|
Oops, forgot the github tag, let me add it |
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. 1. Heavy, blocking work runs inside the
Low-level hook callbacks run on the thread that installed the hook and block delivery of all mouse/keyboard input system-wide until they return. This chain can easily take hundreds of ms to over a second, so every middle-click / hotkey press stutters the entire desktop. This is the most important item. The hook must return almost immediately. Since the hook already runs on your dedicated if (wParam == WM_MBUTTONDOWN && TriggerModeHasMouse() && IsModifierSatisfied() &&
IsPointOnTaskbar(mouse->pt, nullptr)) {
PostThreadMessageW(g_explorerHookThreadId, WM_APP_TOGGLE, 0,
POINTTOPOINTS(mouse->pt));
g_swallowStartTick.store(GetTickCount());
return 1; // swallow, but return right away
}
2. Don't swap the window procedure directly with
Use 3. You don't need to subclass every user-facing window in every process. Combined with 4. 5. Explorer-hosted windows are never restored on unload (reversibility gap). Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations about the feature behavior itself.
|
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.
Two options that come to mind:
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.
|
|
Thanks for the update. You didn't address this:
Also, I tried it with Notepad.
|
Submission reviewBelow is another AI review with correctness issues, but on a personal note: it seems to me like a great idea, but I think that it can be made more useful by having a per-window effect, not a per-process effect. If you manage to extract a window handle, you can use it to hide that exact window. Instead, you get its process id and hide all its windows, which is sub-optimal, while doing the right thing is probably easier. If you don't manage to extract a window handle, you're getting the app id. You could affect all windows with that app id, which is probably the best approximation using that method. Instead, again, you affect all the window of that process. Also, I noticed that the mod doesn't work in some cases, for example the Run dialog (Win+R). Regarding the border color: It's barely noticeable in the default Windows light theme (I haven't tried others). How about changing the default color to something more noticeable, such as red (255, 0, 0)? As discussed before, remove the "Disable protected-app blocking" option and the 1. The hook-retry watchdog timer never fires (and never gets killed). In SetTimer(nullptr, kExplorerHookRetryTimerId, kExplorerHookRetryIntervalMs, nullptr);
...
if (msg.message == WM_TIMER && msg.wParam == kExplorerHookRetryTimerId) { ... }
...
KillTimer(nullptr, kExplorerHookRetryTimerId);When Capture the returned ID and use it (pass UINT_PTR retryTimer = SetTimer(nullptr, 0, kExplorerHookRetryIntervalMs, nullptr);
...
if (msg.message == WM_TIMER && msg.wParam == retryTimer) { ... }
...
KillTimer(nullptr, retryTimer);(Or attach the timer to a 2. Global [[clang::no_destroy]] ComPtr<IUIAutomation> g_uia;The Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations about the feature behavior itself.
|
|
It doesn't work for me when buttons are grouped. For example, with 2 Explorer windows: Does it work for you? Also please remove |
Mod authorship
If this pull request introduces a new mod, please complete the section below.
This mod was created by: