Add Win-X Hot Corners 4.1.1 - #5001
Conversation
macOS-style hot corners and screen edges for Windows 10 and 11, with full multi-monitor support. Move the cursor into a screen corner or against an edge to trigger an action. Each monitor has eight configurable zones - four corners and four edges - and 31 built-in actions including Task View, Show Desktop, Switch to Last Window, Task Switcher, window snapping, virtual desktop navigation, lock, sleep, and arbitrary key combinations or commands. Monitors are identified by their display name read from EDID rather than by position in a list, so rearranging displays or changing which one is primary does not reshuffle the configuration. Detection is per-monitor DPI aware. Detection runs on a dedicated thread in the mod's own process and polls the cursor, rather than installing a global low-level mouse hook, so it adds nothing to the system-wide input path.
|
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. |
|
/ai-review |
|
Really cool mod with so many handy options. Love how fresh this feels on Windows. Great job! 🔥 |
Submitted version moves from 3.5.0 while this pull request is open. The mod's own readme carries the full changelog; the substantive changes are: - Per-zone settings: size, delay, pass-through guard, knock window, cooldown and required modifier can each be overridden for one zone, with blank meaning inherit, so existing configurations behave identically. - A settings dashboard opened from the tray icon, with a live preview of the twelve zones, following the system light/dark theme. - Alternating actions, a centre zone on each edge, and a knock-to-activate trigger. - Monitor names are read once per rebuild and now survive a display layout that changes while it is being read; previously that dropped every name and left name-bound zones unmatched until the next display change.
Fixes the 2.0.0-alpha.2 compile job. The "Require a modifier key" setting was a number carrying $options, which Windhawk 2.0 rejects - and it rejects the whole settings block, so the mod would not have loaded at all there. Windhawk 1.6 and 1.7 accept it, which is why it only surfaced in this matrix. The setting now takes none/ctrl/alt/shift/win. A bare 0-4 is still accepted, so a configuration saved by an earlier build keeps working.
IDC_ZONE_ACTION is a DashId and ZONE_COUNT is a Zone; C++20 deprecates arithmetic between two different enumeration types, which fails the 2.0.0-alpha.2 job because it treats any warning as an error. Cast one side. No behaviour change, so the mod version stays at 4.0.3.
|
/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 tool-mod structure, the snapshot-based detection loop and the zone geometry are all well thought through, and the reasoning left in the comments is genuinely useful. The findings below are mostly about the settings dashboard, which is where the mod stops using Windhawk's own mechanisms and starts replacing them. 1. The dashboard shadows Windhawk's settings page, so editing settings in Windhawk silently does nothing. Once Save and Apply has been pressed, Roughly 1,900 of the 5,528 lines are a second settings UI for settings Windhawk already renders (and renders with localization, validation and per-setting descriptions). The recommendation is to drop the dashboard and the tray's setting toggles entirely and leave Windhawk's settings page as the single source of truth — that also removes items 2 and the dashboard half of the optional findings below. If you want to keep it, Windhawk's page has to stay authoritative: a settings change should win over the stored overrides, not be discarded by them. 2. The dashboard binds zone configurations to the wrong monitor, and only ever saves one of them. Two separate defects in the same path, both reachable in ordinary use:
3.
Better still, you already own two top-level windows that run 4. Drop the The premise stated in the setting description and the README ("these logs go through 5. No screenshot in the README. The mod is largely invisible by nature, but the dashboard with its live zone preview is exactly the kind of thing a screenshot sells, and a short GIF of a corner firing would make the concept obvious at a glance. Only 6. Overlap with an existing mod. edge-hot-corner-desktop-switch does exactly one thing this mod also does — left/right edge hover switches virtual desktop — so this submission is a strict superset of it. That is not a duplicate in the problematic sense (the scope here is far wider, and the trigger model is different from hotcorner-hotkeys, which dispatches on a hotkey rather than on hover), but it is worth a line in the README so users know which one to pick. 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. |
|
/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 detection core is in good shape — the immutable 1. Removing the Windhawk settings page is the wrong trade, and the "700 lines of YAML" premise doesn't hold. Your reasoning for one source of truth is correct — a mod cannot write its own settings, so a dashboard that edits settings and a settings page that also edits them will always diverge. But the conclusion only follows if the settings block really has to be a static 12-zones × 8-displays tree. It doesn't. The idiomatic shape for this is an array of groups: one entry per zone the user actually configures, with - zones:
- - monitor: "*"
$name: Monitor
$description: The display's name as printed in the log, or * for all displays.
- zone: TOP_LEFT
$name: Zone
$options:
- TOP_LEFT: Top-left corner
# ... 11 more
- action: ACTION_NOTHING
$name: Action
$options:
- ACTION_NOTHING: Nothing
# ... the same list kActionIds already holds
- args: ""
$name: Argument / command
- size: -1
$name: Size override (-1 = inherit)
# ... the other five overrides
$name: Zones
$description: Add one entry per zone you want to use.That is one screen of YAML, it scales to any number of displays (dropping What the current arrangement costs users:
Recommendation: restore 2. The dashboard binds each stored zone configuration to a combo-box position, not to a monitor — so changing your display setup silently moves configurations onto the wrong screen.
The runtime resolution (
Plugging in a display that sorts before an existing one has the same effect, shifted the other way. This is the same class of bug the 4.1.0 changelog says was fixed — removing the settings-page seeding fixed the seed, but the slot↔store addressing is still positional. If the dashboard stays, address slots by identity: when filling combo entry 3.
static DWORD WINAPI ActionWorkerThread(LPVOID) {
CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
// ...
CoUninitialize();
return 0;
}and 4. The readme has no screenshot. The mod's whole configuration surface is a window nobody can see before installing, and the tray icon is the only entry point. A screenshot of the dashboard (and ideally the tray menu) in the readme would do a lot of work here. Only Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behaviour itself.
Next steps:
See the review process for details. |
Adds Win-X Hot Corners, a hot corners and screen edges mod for Windows 10 and 11.
Moving the cursor into a screen corner, or against a screen edge, triggers a configurable action. Each monitor gets twelve independent zones — four corners, four edges and a centre block on each edge — and there are 32 built-in actions plus arbitrary key combinations and commands.
Notes on the implementation
Detection does not use a low-level mouse hook. A
WH_MOUSE_LLhook has to return withinLowLevelHooksTimeoutor Windows skips the callback and eventually removes the hook, which shows up as corners that intermittently stop working. It also puts the mod on the input path of every application on the system. This mod instead polls the cursor every 16 ms on a dedicated thread in its own tool-mod process, so it adds nothing to system-wide input handling and cannot be starved.Monitors are identified by display name read via
QueryDisplayConfig, not by position in an enumeration. Rearranging displays or changing which one is primary therefore does not silently repoint a configuration at a different screen. Identical models are disambiguated with a numeric suffix.Per-monitor DPI aware. The detection thread pins
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2, so zone rectangles and cursor coordinates agree on mixed-scaling setups.Zone geometry is provably disjoint. Corner and edge sizes are clamped per monitor so the zones can never overlap, which matters because the hit test is first-match-wins. Each edge's thickness is capped at the smaller of the two corners it runs between, which is what keeps the twelve zones disjoint under arbitrary per-zone sizes.
Actions run on a separate worker thread, with a rate limit between them, so a slow launch cannot delay detection and rapid triggering cannot flood the shell.
There is no settings page; the mod is configured from its tray icon. This changed in 4.1.0 and is worth explaining, because the earlier review of this pull request suggested the opposite — dropping the tray dashboard and keeping the settings page.
The problem is that the two could never agree. Twelve zones on each of up to eight displays, each with a 36-entry action list, an argument field and six timing overrides, is a settings tree of roughly 700 lines of YAML that reviewers and users alike found unusable. But a mod cannot write its own settings from code, so anything changed in the mod's own UI could not be written back to the page — leaving two sources of truth that diverged the moment either was touched. Rather than keep both, the settings block was deleted outright and the mod's value store became the only place configuration lives.
Left-clicking the tray icon toggles the mod; right-clicking gives a short menu (suspend, the fullscreen and drag guards) and opens the dashboard, which has a clickable live preview of the zones on the selected display, grouped options with hover help, and follows the system light/dark theme. The mod logs a line at startup saying where to find it, and the readme leads with it.
Checklist
mods/win-x-hotcorners.wh.cppwin-x-hotcornersmatches the filename@githubis https://github.com/DhakadG, which is the author of this pull requestInspired by WinXCorners by @vhanla. This is an independent implementation rather than a port of that code.
Source repository: https://github.com/DhakadG/win-x-hotcorners
Changelog
If this pull request updates an existing mod, describe the changes below:
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.