srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/ctl/src
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2024-08-20 21:37:00 +0200
committersrdusr <[email protected]>2024-08-20 21:37:00 +0200
commitd124fc27826c2cdf57e46d104db5347434454a24 (patch)
treed06249c6bdd3e3814a194bb493ae7733d905f661 /crates/ctl/src
parentbefafe50f1d90c7d665ef2ca15a44aee90b2954b (diff)
downloadsrdwm-d124fc27826c2cdf57e46d104db5347434454a24.tar.gz
srdwm-d124fc27826c2cdf57e46d104db5347434454a24.zip
Give corner resize real priority over a plain edge
Reported live, repeatedly: corners felt like they had no priority over sides. They didn't, structurally - a corner only ever registered in the exact pixel square where both edges' own resize_margin zones happened to overlap (6x6px at the default 6px margin), nothing wider. A click a little further along either axis, still clearly aiming for the corner, fell back to a single straight-edge resize instead. resize_edge_at now checks a separate, wider corner zone (CORNER_MARGIN * resize_margin) first, so a corner claims a real, deliberately larger target the way GNOME/KDE already do - diagonal resize is a harder grab than a straight edge and deserves more room, not the same or less. Also fixed a related, previously-unreachable case: a *decorated* window's whole titlebar band returned Drag/Close/Maximize/Minimize unconditionally, so top-left/top-right diagonal resize never had a code path at all, even at the titlebar's own corner pixels. Added top-left resize as a small, genuine corner square (both axes, not just one) checked before drag/buttons. Deliberately did NOT add the matching top-right case: that corner is the close button on every mainstream desktop, and trading a well-known, expected target for a rarely-wanted one at exactly the spot a miss costs the most isn't a trade worth making. Four new regression tests cover: reaching a corner past the old tight margin, falling back to a plain edge just past the new wider one, the newly-reachable decorated top-left corner, and confirming top-right still closes rather than competing with resize.
Diffstat (limited to 'crates/ctl/src')
0 files changed, 0 insertions, 0 deletions