desktop/output: merge power management config on top of current one

Don't replace an existing config with a blank one with just the
power field set.

Logic borrowed from apply_output_config_to_outputs().
This commit is contained in:
Simon Ser 2024-03-08 12:31:30 +01:00
parent bc30ec6dd3
commit be22072492

View file

@ -644,6 +644,12 @@ void handle_output_power_manager_set_mode(struct wl_listener *listener,
oc->power = 1;
break;
}
oc = store_output_config(oc);
apply_output_config(oc, output);
struct output_config *current = find_output_config(output);
if (!current) {
current = new_output_config(oc->name);
merge_output_config(current, oc);
}
apply_output_config(current, output);
free_output_config(current);
}