config/output: Fix missing output config supersedes

color_transform and allow_tearing was not handled by
supersede_output_config which could lead to configuration being
incorrectly applied.
This commit is contained in:
Kenny Levinsen 2025-04-29 13:39:00 +02:00 committed by Simon Ser
parent 8ac1f72c9e
commit f9945d81fb

View file

@ -129,6 +129,13 @@ static void supersede_output_config(struct output_config *dst, struct output_con
if (src->render_bit_depth != RENDER_BIT_DEPTH_DEFAULT) {
dst->render_bit_depth = RENDER_BIT_DEPTH_DEFAULT;
}
if (src->set_color_transform) {
if (dst->color_transform) {
wlr_color_transform_unref(dst->color_transform);
dst->color_transform = NULL;
}
dst->set_color_transform = false;
}
if (src->background) {
free(dst->background);
dst->background = NULL;
@ -144,6 +151,9 @@ static void supersede_output_config(struct output_config *dst, struct output_con
if (src->power != -1) {
dst->power = -1;
}
if (src->allow_tearing != -1) {
dst->allow_tearing = -1;
}
}
// merge_output_config sets all fields in dst that were set in src