mirror of
https://github.com/labwc/labwc.git
synced 2026-02-08 10:06:59 -05:00
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:
parent
9ad6e3c68c
commit
950337b895
9 changed files with 102 additions and 60 deletions
|
|
@ -151,6 +151,7 @@ struct rcxml {
|
|||
|
||||
enum resize_indicator_mode resize_indicator;
|
||||
bool resize_draw_contents;
|
||||
int resize_corner_range;
|
||||
|
||||
struct {
|
||||
int popuptime;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
#include <wayland-server-core.h>
|
||||
#include "common/border.h"
|
||||
|
||||
struct wlr_cursor;
|
||||
|
||||
#define SSD_EXTENDED_AREA 8
|
||||
|
||||
/*
|
||||
|
|
@ -107,10 +109,8 @@ enum ssd_part_type ssd_button_get_type(const struct ssd_button *button);
|
|||
struct view *ssd_button_get_view(const struct ssd_button *button);
|
||||
|
||||
/* Public SSD helpers */
|
||||
enum ssd_part_type ssd_at(const struct ssd *ssd,
|
||||
struct wlr_scene *scene, double lx, double ly);
|
||||
enum ssd_part_type ssd_get_part_type(const struct ssd *ssd,
|
||||
struct wlr_scene_node *node);
|
||||
struct wlr_scene_node *node, struct wlr_cursor *cursor);
|
||||
uint32_t ssd_resize_edges(enum ssd_part_type type);
|
||||
bool ssd_part_contains(enum ssd_part_type whole, enum ssd_part_type candidate);
|
||||
enum ssd_mode ssd_mode_parse(const char *mode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue