mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
Insert new outputs at the end of the list
This prevents auto-configuring a new output from changing the position of existing outputs. (v2: simplify insert-at-end logic)
This commit is contained in:
parent
0fb479ca61
commit
bff5b2c559
1 changed files with 6 additions and 1 deletions
|
@ -185,7 +185,12 @@ static struct wlr_output_layout_output *output_layout_output_create(
|
||||||
l_output->state->layout = layout;
|
l_output->state->layout = layout;
|
||||||
l_output->output = output;
|
l_output->output = output;
|
||||||
wl_signal_init(&l_output->events.destroy);
|
wl_signal_init(&l_output->events.destroy);
|
||||||
wl_list_insert(&layout->outputs, &l_output->link);
|
|
||||||
|
/*
|
||||||
|
* Insert at the end of the list so that auto-configuring the
|
||||||
|
* new output doesn't change the layout of other outputs
|
||||||
|
*/
|
||||||
|
wl_list_insert(layout->outputs.prev, &l_output->link);
|
||||||
|
|
||||||
wl_signal_add(&output->events.mode, &l_output->state->mode);
|
wl_signal_add(&output->events.mode, &l_output->state->mode);
|
||||||
l_output->state->mode.notify = handle_output_mode;
|
l_output->state->mode.notify = handle_output_mode;
|
||||||
|
|
Loading…
Reference in a new issue