Skip to content

Commit f9945d8

Browse files
kennylevinsenemersion
authored andcommitted
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.
1 parent 8ac1f72 commit f9945d8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sway/config/output.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ static void supersede_output_config(struct output_config *dst, struct output_con
129129
if (src->render_bit_depth != RENDER_BIT_DEPTH_DEFAULT) {
130130
dst->render_bit_depth = RENDER_BIT_DEPTH_DEFAULT;
131131
}
132+
if (src->set_color_transform) {
133+
if (dst->color_transform) {
134+
wlr_color_transform_unref(dst->color_transform);
135+
dst->color_transform = NULL;
136+
}
137+
dst->set_color_transform = false;
138+
}
132139
if (src->background) {
133140
free(dst->background);
134141
dst->background = NULL;
@@ -144,6 +151,9 @@ static void supersede_output_config(struct output_config *dst, struct output_con
144151
if (src->power != -1) {
145152
dst->power = -1;
146153
}
154+
if (src->allow_tearing != -1) {
155+
dst->allow_tearing = -1;
156+
}
147157
}
148158

149159
// merge_output_config sets all fields in dst that were set in src

0 commit comments

Comments
 (0)