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

@ -156,6 +156,26 @@ regions_update(struct output *output)
}
}
void
regions_evacuate_output(struct output *output)
{
assert(output);
struct view *view;
struct region *region;
wl_list_for_each(view, &output->server->views, link) {
wl_list_for_each(region, &output->regions, link) {
if (view->tiled_region == region) {
if (!view->tiled_region_evacuate) {
view->tiled_region_evacuate =
xstrdup(region->name);
}
break;
}
}
}
}
void
regions_destroy(struct wl_list *regions)
{