libweston: Skip setting DPMS if output is not enabled

With the output not being enabled, there's no way we can actually
manipulate its DPMS state.

Signed-off-by: marius vlad <marius.vlad@collabora.com>
This commit is contained in:
marius vlad 2023-04-03 20:36:47 +03:00 committed by Pekka Paalanen
parent 70004a7edc
commit 82dbb606a2

View file

@ -7625,7 +7625,7 @@ weston_output_force_power(struct weston_output *output,
output->compositor->state == WESTON_COMPOSITOR_OFFSCREEN)
return;
if (!output->set_dpms)
if (!output->set_dpms || !output->enabled)
return;
dpms = (power == WESTON_OUTPUT_POWER_NORMAL) ? WESTON_DPMS_ON : WESTON_DPMS_OFF;