mirror of
https://github.com/swaywm/sway.git
synced 2025-11-04 13:29:52 -05:00
Handle output remove
This commit is contained in:
parent
a4619e98c4
commit
ec2fd6e5c0
2 changed files with 21 additions and 1 deletions
|
|
@ -23,10 +23,16 @@ static void output_layout_change_notify(struct wl_listener *listener, void *data
|
|||
|
||||
for (int i = 0 ; i < root_container.children->length; ++i) {
|
||||
swayc_t *output_container = root_container.children->items[i];
|
||||
if (output_container->type != C_OUTPUT) {
|
||||
continue;
|
||||
}
|
||||
struct sway_output *output = output_container->sway_output;
|
||||
|
||||
struct wlr_box *output_box = wlr_output_layout_get_box(
|
||||
root_container.sway_root->output_layout, output->wlr_output);
|
||||
if (!output_box) {
|
||||
continue;
|
||||
}
|
||||
output_container->x = output_box->x;
|
||||
output_container->y = output_box->y;
|
||||
output_container->width = output_box->width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue