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

@ -278,7 +278,8 @@ get_cursor_context(struct server *server)
case LAB_NODE_DESC_VIEW:
case LAB_NODE_DESC_XDG_POPUP:
ret.view = desc->data;
ret.type = ssd_get_part_type(ret.view->ssd, ret.node);
ret.type = ssd_get_part_type(
ret.view->ssd, ret.node, cursor);
if (ret.type == LAB_SSD_CLIENT) {
ret.surface = lab_wlr_surface_from_node(ret.node);
}