ssd: fix resizing on border corners and add <resize><cornerRange>

Co-authored-by: @ahesford

The direction of resizing was determined based on the hovered ssd
component (e.g. left border, top-left extent), but it caused problems when
trying to start resizing by pressing the corners of the window border; the
resizing direction was always unidirectional at bottom corners and
resizing cannot be started by pressing top corners.

This commit fixes this weirdness by determining resize directions only
based on the window geometry and the cursor position. The corner extents
are removed as they are not longer needed.

This commit also adds <resize><cornerRange> which configures the range of
corner resizing on the borders/extent.
This commit is contained in:
tokyo4j 2025-02-01 14:51:47 +09:00
parent 9a473f1848
commit e98406168d
8 changed files with 89 additions and 59 deletions

View file

@ -576,6 +576,12 @@ extending outward from the snapped edge.
outlined rectangle is shown to indicate the geometry of resized window.
Default is yes.
*<resize><cornerRange>*
The size of corner regions to which the 'TLCorner', 'TRCorner',
'BLCorner' and 'RLCorner' mousebind contexts apply, as well as the size
of the border region for which mouse resizing will apply both
horizontally and vertically rather than one or the other. Default is 8.
## KEYBOARD
*<keyboard><numlock>* [on|off]