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

Eliminate corner extents and instead use cursor position to map SSD
borders and extents to corner contexts, with a size configurable by the
<resize><cornerRange> parameter. This simplifies extent handling,
eliminates bugs in the detection of corner context, and allows users to
expand corner targets if they wish.

Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
This commit is contained in:
tokyo4j 2025-02-01 14:51:47 +09:00 committed by Andrew J. Hesford
parent 9ad6e3c68c
commit 950337b895
9 changed files with 102 additions and 60 deletions

View file

@ -1388,6 +1388,10 @@ post_processing(struct theme *theme)
rc.corner_radius = theme->titlebar_height - 1;
}
if (rc.resize_corner_range < 0) {
rc.resize_corner_range = theme->titlebar_height / 2;
}
int min_button_hover_radius =
MIN(theme->window_button_width, theme->window_button_height) / 2;
if (theme->window_button_hover_bg_corner_radius > min_button_hover_radius) {