xdg: add snapping.notifyClient option to control tiling events

This commit is contained in:
Andrew J. Hesford 2024-01-22 22:11:53 -05:00
parent 9f51384b6a
commit 3162bbb3c2
7 changed files with 100 additions and 41 deletions

View file

@ -35,6 +35,14 @@ enum adaptive_sync_mode {
LAB_ADAPTIVE_SYNC_FULLSCREEN,
};
enum tiling_events_mode {
LAB_TILING_EVENTS_NEVER = 0,
LAB_TILING_EVENTS_REGION = 1 << 0,
LAB_TILING_EVENTS_EDGE = 1 << 1,
LAB_TILING_EVENTS_ALWAYS =
(LAB_TILING_EVENTS_REGION | LAB_TILING_EVENTS_EDGE),
};
struct usable_area_override {
struct border margin;
char *output;
@ -114,6 +122,7 @@ struct rcxml {
/* window snapping */
int snap_edge_range;
bool snap_top_maximize;
enum tiling_events_mode snap_tiling_events_mode;
enum resize_indicator_mode resize_indicator;

View file

@ -94,7 +94,7 @@ struct view_impl {
void (*map)(struct view *view);
void (*set_activated)(struct view *view, bool activated);
void (*set_fullscreen)(struct view *view, bool fullscreen);
void (*set_tiled)(struct view *view);
void (*notify_tiled)(struct view *view);
/*
* client_request is true if the client unmapped its own
* surface; false if we are just minimizing the view. The two