diff --git a/src/__main__.py b/src/__main__.py index 20cc9c380..1fe65bae8 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -123,6 +123,7 @@ def parse(argv): from bridge import Greeter, Config, ThemeUtils from PyQt5.QtWidgets import QApplication from PyQt5.QtCore import Qt, QCoreApplication + from logger import logger QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling) QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) @@ -141,3 +142,6 @@ def parse(argv): # browser.load() browser.show() browser.run() + + logger.debug("App closed") + sys.exit(0) diff --git a/src/bridge/Greeter.py b/src/bridge/Greeter.py index 41196553c..7ae7a4e66 100644 --- a/src/bridge/Greeter.py +++ b/src/bridge/Greeter.py @@ -93,6 +93,7 @@ def __init__(self, *args, **kwargs): self._brightness_controller = BrightnessController() try: + LightDMGreeter.set_resettable(True) LightDMGreeter.connect_to_daemon_sync() except GError as err: logger.error(err) @@ -367,6 +368,8 @@ def shutdown(self): @Bridge.method(str, result=bool) def start_session(self, session): + from PyQt5.QtCore import QCoreApplication + if not session.strip(): return False try: @@ -374,6 +377,7 @@ def start_session(self, session): if started or self.is_authenticated: logger.debug("Session \"%s\" started", session) screensaver.reset_screensaver() + QCoreApplication.quit() # Quit application after start_session return started except GError as err: logger.error(err)