Repository navigation
[Simple Window Switcher -> WindowSwitcher++] Animations, Touchpad support, New Layout and much more - #5396
[Simple Window Switcher -> WindowSwitcher++] Animations, Touchpad support, New Layout and much more#5396Louis047 wants to merge 133 commits into
Conversation
|
Thanks for the pull request! This repository uses a two-stage review: an AI review that you run yourself, followed by a human review. To get started, comment See the pull request review process for the full details. |
…nal keyboard layouts
|
/ai-review |
Submission reviewNote: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. Focused, well-scoped update, and the delay-phase rework is a clear improvement over the off-screen coordinate trick. A few issues in the new code: 1. The sibling-restore fallback steals activation from the target window. In ShowWindow(hw, SW_SHOWNOACTIVATE);
if (IsIconic(hw)) {
PostMessage(hw, WM_SYSCOMMAND, SC_RESTORE, 0);
}
If the fallback is needed for elevated siblings, use an asynchronous form that preserves the no-activate semantics instead: if (IsIconic(hw)) {
ShowWindowAsync(hw, SW_SHOWNOACTIVATE);
}At minimum, don't use 2.
The next show that doesn't go through the delay path then renders with DWM non-client rendering off — no drop shadow, and for the Backdrop/Mica themes the Restore it unconditionally in static void HideSwitcher() {
g_showAllMonitors = false;
CancelPendingShow();
if (g_hSwitcher) {
KillTimer(g_hSwitcher, SWS_ALT_POLL_TIMER_ID);
DWMNCRENDERINGPOLICY enabled = DWMNCRP_ENABLED;
DwmSetWindowAttribute(g_hSwitcher, DWMWA_NCRENDERING_POLICY, &enabled, sizeof(enabled));
}
...3. Registering
So with both registered, a UK user gets the intended Alt+ Resolve the physical key instead of guessing VKs — scan code UINT vkBacktick = MapVirtualKeyExW(0x29, MAPVK_VSC_TO_VK, GetKeyboardLayout(0));
if (!vkBacktick) vkBacktick = VK_OEM_3;
BOOL r5 = wantAltBacktick
? RegisterHotKey(g_hSwitcher, SWS_HOTKEY_ALTBACKTICK, MOD_ALT, vkBacktick) : TRUE;That fixes the UK case and the pre-existing wrong-key grab on other non-US layouts, with one hotkey ID instead of two. Note the layout is per-thread, so if you want it to follow layout switches you'd re-register on 4. The delay-phase window now sits exactly over the switcher's target rect, and the mouse handlers aren't gated on The invisible window is case WM_LBUTTONUP: {
int x = GET_X_LPARAM(lParam), y = GET_Y_LPARAM(lParam);
int idx = HitTest(x, y);
if (idx >= 0) { ... SwitchToSelected(); }If a click does land on the invisible window, the mod silently switches windows with no UI ever shown. Make it deterministic rather than relying on hit-test behaviour: add 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.
Next steps:
See the review process for details. |
…yout resolution, sibling focus preservation, and delay transparency
|
Pushed an update addressing the review findings on hotkey layout resolution, sibling activation, and delay transparency:
Regarding items intentionally left unaddressed:
/ai-review |
…ktick layout resolution, sibling focus preservation, and delay transparency"
Submission reviewNote: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. One real bug in the new delayed-show path; the rest is optional.
static void CancelPendingShow() {
if (g_hSwitcher) {
KillTimer(g_hSwitcher, SWS_SHOW_DELAY_TIMER_ID);
KillTimer(g_hSwitcher, SWS_ALT_POLL_TIMER_ID);
DWMNCRENDERINGPOLICY enabled = DWMNCRP_ENABLED;
DwmSetWindowAttribute(g_hSwitcher, DWMWA_NCRENDERING_POLICY, &enabled, sizeof(enabled));
} // <- WS_EX_TRANSPARENT stays set
g_isPendingShow = false;
}
Two ways users hit this with a Show Delay configured:
Clearing it where the pending state is torn down fixes both: static void CancelPendingShow() {
if (g_hSwitcher) {
KillTimer(g_hSwitcher, SWS_SHOW_DELAY_TIMER_ID);
KillTimer(g_hSwitcher, SWS_ALT_POLL_TIMER_ID);
DWMNCRENDERINGPOLICY enabled = DWMNCRP_ENABLED;
DwmSetWindowAttribute(g_hSwitcher, DWMWA_NCRENDERING_POLICY, &enabled, sizeof(enabled));
+ // Drop the click-through style used for the invisible pre-show window;
+ // otherwise it survives into the next non-delayed / sticky show.
+ LONG_PTR exStyle = GetWindowLongPtrW(g_hSwitcher, GWL_EXSTYLE);
+ SetWindowLongPtrW(g_hSwitcher, GWL_EXSTYLE, exStyle & ~WS_EX_TRANSPARENT);
}
g_isPendingShow = false;
}( Optional improvements
Minor polish — none of this affects users in normal operation, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behavior itself.
Next steps:
See the review process for details. |
|
Reverted the experimental changes from commit
The mod is working as expected and ready for human review. /ready-for-reviewer |
|
Reverted the experimental changes from
/ai-review |
Submission reviewNote: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. The branch head is a revert of your own fix commit. The last commit (
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.
Next steps:
See the review process for details. |
…ng focus, and guard pending delay interactions
|
Pushed an update addressing the review findings and two newly reported user bug fixes:
Regarding items intentionally left unaddressed:
/ai-review |
|
Thanks for the review. Changes since the reviewed head (4d7e1f5), now at 9024dd6: Remaining items
/ai-review |
Submission reviewNote: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. Thanks for the update. The fixes from the last round check out:
There's a correction to my last review in item 1, and one small new item on the composed material (under Optional improvements). The corner-radius coupling (item 2) is still left to the maintainer.
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.
Code overview
For the maintainer: a map of the mod and what it touches outside its own process. Descriptive only — anything that needs a change is listed above. Line numbers refer to the mod source at commit The merged version is 5,600 lines and this one is 24,094. Even ignoring line endings, only short runs and the tool-launcher boilerplate are unchanged, so nearly every region is new or rewritten. Code regions
Side effects of interest
Next steps:
See the review process for details. Important: Each reply that was generated by AI must be disclosed by including the following text in the reply: "Generated by AI. Model: (ai-model-name)". |
|
Thanks for the review. Changes since the reviewed head (9024dd6), now at bc8e28e:
Optional improvements
Functionality notes
Also new in this push
/ai-review |
Submission reviewNote: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. Thanks for the update. Since the last round:
Re-reading the full source turned up one new item (1). Item 2 is unchanged and stays with the maintainer.
Code overview
For the maintainer: a map of the mod and what it touches outside its own process. Descriptive only — anything that needs a change is listed above. Line numbers refer to the mod source at commit The merged version is 5,600 lines and this one is 24,106. Apart from short runs and the tool-launcher boilerplate, nearly every region is new or rewritten. Code regions
Side effects of interest
Next steps:
See the review process for details. Important: Each reply that was generated by AI must be disclosed by including the following text in the reply: "Generated by AI. Model: (ai-model-name)". |
|
Thanks for the review. Changes since the reviewed head (bc8e28e), now at 7adc487:
Also new in this push
/ai-review |
Submission reviewNote: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. Thanks for the update. Both changes since the last round check out:
The remaining item is unchanged from the last round and stays with the maintainer.
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.
Code overview
For the maintainer: a map of the mod and what it touches outside its own process. Descriptive only — anything that needs a change is listed above. Line numbers refer to the mod source at commit The merged version is 5,600 lines and this one is 24,175. Apart from short runs and the tool-launcher boilerplate, nearly every region is new or rewritten. Code regions
Side effects of interest
Next steps:
See the review process for details. Important: Each reply that was generated by AI must be disclosed by including the following text in the reply: "Generated by AI. Model: (ai-model-name)". |
Changelog
Version 3.0 (from 2.1). The mod is renamed to WindowSwitcher++.
New features
Improvements
Fixes
VK_OEM_8key. Credit: @AromaKitsune.Issue References