mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-20 20:44:18 +02:00
Only update output id on priority change
This commit is contained in:
parent
d0770ffb19
commit
4b4f6d4274
1 changed files with 6 additions and 2 deletions
8
output.c
8
output.c
|
|
@ -317,6 +317,7 @@ output_apply_config(struct cg_server *server, struct cg_output *output,
|
|||
prev_box.y = output->layout_box.y;
|
||||
prev_box.width = output->layout_box.width;
|
||||
prev_box.height = output->layout_box.height;
|
||||
bool prio_changed=false;
|
||||
if(config->role != OUTPUT_ROLE_DEFAULT) {
|
||||
output->role = config->role;
|
||||
if((output->role == OUTPUT_ROLE_PERIPHERAL) &&
|
||||
|
|
@ -328,6 +329,7 @@ output_apply_config(struct cg_server *server, struct cg_output *output,
|
|||
}
|
||||
|
||||
if(config->priority != -1) {
|
||||
prio_changed = (output->priority != config->priority);
|
||||
output->priority = config->priority;
|
||||
}
|
||||
|
||||
|
|
@ -416,8 +418,10 @@ output_apply_config(struct cg_server *server, struct cg_output *output,
|
|||
wlr_output_enable(wlr_output, false);
|
||||
wlr_output_commit(wlr_output);
|
||||
} else {
|
||||
wl_list_remove(&output->link);
|
||||
output_insert(server, output);
|
||||
if(prio_changed) {
|
||||
wl_list_remove(&output->link);
|
||||
output_insert(server, output);
|
||||
}
|
||||
wlr_output_enable(wlr_output, true);
|
||||
wlr_output_commit(wlr_output);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue