Skip to content

Fix lingering dpms input event filter after cancelling scheduled dpms mode change

The output goes through the following stages when it changes its dpms mode:

  • Output::aboutToTurnOff()]
  • some time later, Output::dpmsModeChanged() to indicate that it's off
  • Output::dpmsModeChanged() to indicate that it's back on
  • Output::wakeUp()

The Output::dpmsModeChanged() signals in the middle are optional. They may not be emitted after Output::aboutToTurnOff() if the user quickly cancels the dpms mode transition.

The Workspace should monitor the Output::wakeUp() signal instead. Alternatively, create the dpms input event filter only after the dpms mode has changed. While the screen won't be turned back on immediately, it's still going to produce acceptable visuals. Either solution is fine. This patch makes the Workspace monitor the wakeUp signal because it takes fewer lines of code.

BUG: 479659

Merge request reports

Loading