diff --git a/web-greeter/setup.py b/web-greeter/setup.py index e0afeba..c94db02 100644 --- a/web-greeter/setup.py +++ b/web-greeter/setup.py @@ -23,6 +23,7 @@ setup( options = {"build_exe": { "build_exe": "dist", "packages": ["gi", "Xlib"], + "includes": ["gi"], "silent_level": 0, }}, ) diff --git a/web-greeter/utils/screensaver.py b/web-greeter/utils/screensaver.py index 6d339f8..6cafc59 100644 --- a/web-greeter/utils/screensaver.py +++ b/web-greeter/utils/screensaver.py @@ -1,11 +1,11 @@ from logger import logger from Xlib.display import Display -saved_data: dict[str, int] +saved_data: dict = {} saved = False available = False -display = None +display: Display def init_display(): global display, available @@ -20,6 +20,7 @@ def set_screensaver(timeout: int): if saved or not available: return display.sync() + display.sync() data: dict[str, int] = display.get_screen_saver()._data or {} saved_data = data saved = True