diff --git a/safeeyes/SafeEyes.py b/safeeyes/SafeEyes.py index 29763d1..9f8dcd7 100644 --- a/safeeyes/SafeEyes.py +++ b/safeeyes/SafeEyes.py @@ -22,6 +22,7 @@ SafeEyes connects all the individual components and provide the complete applica import atexit import logging +import os from threading import Timer import dbus @@ -141,6 +142,8 @@ class SafeEyes(object): self.plugins_manager.exit() self.rpc_server.stop() Gtk.main_quit() + # Exit all threads + os._exit(0) def handle_suspend_callback(self, sleeping): """ diff --git a/safeeyes/Utility.py b/safeeyes/Utility.py index 6bddd04..1f26f91 100644 --- a/safeeyes/Utility.py +++ b/safeeyes/Utility.py @@ -81,7 +81,7 @@ def start_thread(target_function, **args): """ Execute the function in a separate thread. """ - thread = threading.Thread(target=target_function, name="WorkThread", kwargs=args) + thread = threading.Thread(target=target_function, name="WorkThread", daemon=False, kwargs=args) thread.start() diff --git a/safeeyes/plugins/trayicon/plugin.py b/safeeyes/plugins/trayicon/plugin.py index 69fdb5b..4c16909 100644 --- a/safeeyes/plugins/trayicon/plugin.py +++ b/safeeyes/plugins/trayicon/plugin.py @@ -216,13 +216,13 @@ class TrayIcon(object): Handle Quit menu action. This action terminates the application. """ - self.quit() with self.lock: self.active = True # Notify all schedulers self.idle_condition.acquire() self.idle_condition.notify_all() self.idle_condition.release() + self.quit() def show_settings(self, *args): """