SnapToRegion: Evacuate tiled views from destroying outputs

This commit is contained in:
Consolatis 2022-07-07 19:05:54 +02:00
parent 25cea94a32
commit 4edd67de17
5 changed files with 56 additions and 0 deletions

View file

@ -28,6 +28,7 @@ bool regions_available(void);
void regions_init(struct server *server, struct seat *seat);
void regions_update(struct output *output);
void regions_evacuate_output(struct output *output);
void regions_destroy(struct wl_list *regions);
struct region *regions_from_cursor(struct server *server);

View file

@ -50,7 +50,12 @@ struct view {
bool minimized;
bool maximized;
uint32_t tiled; /* private, enum view_edge in src/view.c */
/* Pointer to an output owned struct region, may be NULL or already free'd */
struct region *tiled_region;
/* Set to region->name when tiled_region is free'd by a destroying output */
char *tiled_region_evacuate;
struct wlr_output *fullscreen;
/* geometry of the wlr_surface contained within the view */