fix: screen not staying off (#1506)

When the screensaver is active and the screen is turned off due to DPMS
the unconditional call to self.screensaver.show wakes the screen up
again.
The check whether the screensaver is already active got lost in the
refactor.

Fixes #1504
This commit is contained in:
Axel Pirek
2024-11-17 16:04:13 +01:00
committed by GitHub
parent 43ad9fc6ae
commit c79ba16ff7
2 changed files with 5 additions and 1 deletions

View File

@@ -619,7 +619,8 @@ class KlipperScreen(Gtk.Window):
self.set_dpms(False)
return False
elif state != functions.DPMS_State.On:
self.screensaver.show()
if not self.screensaver.is_showing():
self.screensaver.show()
return True
def wake_screen(self):