Don't add disabled outputs back to output layout

Return early from apply_output_config if the output is disabled.
This restores our previous behavior [1].

[1]: 0cdcf66bbc (diff-4f65f4327e987fef8ec3796cdb07644eL349)
This commit is contained in:
Simon Ser 2020-04-09 10:18:40 +02:00 committed by Drew DeVault
parent 97a6524a5a
commit 34dccd4224

View file

@ -425,6 +425,10 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
return false; return false;
} }
if (oc && !oc->enabled) {
return true;
}
if (config->reloading) { if (config->reloading) {
output_damage_whole(output); output_damage_whole(output);
} }
@ -464,7 +468,7 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
output->width = output_box->width; output->width = output_box->width;
output->height = output_box->height; output->height = output_box->height;
if ((!oc || oc->enabled) && !output->configured) { if (!output->configured) {
output_configure(output); output_configure(output);
} }