mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
SnapToRegion: Evacuate tiled views from destroying outputs
This commit is contained in:
parent
25cea94a32
commit
4edd67de17
5 changed files with 56 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue