backends/drm: don't set the dpms mode to AboutToTurnOff if the screen is already off

Otherwise, DrmOutput::setDrmDpmsMode will inhibit the renderloop for a second time, and it'll
never be completely un-inhibited, which means the screen stays off.
wilder/Plasma/6.3
Xaver Hugl 1 year ago
parent 1d03b04749
commit d90c64bc7c
  1. 3
      src/backends/drm/drm_output.cpp

@ -142,6 +142,9 @@ QList<std::shared_ptr<OutputMode>> DrmOutput::getModes() const
void DrmOutput::setDpmsMode(DpmsMode mode)
{
if (mode == dpmsMode()) {
return;
}
if (mode == DpmsMode::Off) {
if (!m_turnOffTimer.isActive()) {
updateDpmsMode(DpmsMode::AboutToTurnOff);

Loading…
Cancel
Save