From d1df23f4e3b26dbcc873f36238eaaf15e8ae8e60 Mon Sep 17 00:00:00 2001 From: KeksNino Date: Wed, 8 Apr 2026 02:14:05 +0200 Subject: [PATCH] fix: application not closing fully when doing ctrl + c --- src/main.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.py b/src/main.py index 77436be..1ab77ad 100644 --- a/src/main.py +++ b/src/main.py @@ -31,6 +31,12 @@ def run_gui(app): qdarktheme.setup_theme("auto", custom_colors=custom_colors if custom_colors else None) widget = MainWindow() + # Check OS for window transparency compatibility and apply + if state.window_transparency and platform.system() != "Windows": + widget.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground) + transparent_colors = {"background": "#00000000", **custom_colors} + qdarktheme.setup_theme("auto", custom_colors=transparent_colors) + pixmap = QPixmap() image_data = base64.b64decode(logo_base64) pixmap.loadFromData(image_data) @@ -50,17 +56,11 @@ def run_gui(app): menu.addAction(quit) tray.activated.connect(lambda reason: widget.show() if reason == QSystemTrayIcon.ActivationReason.Trigger else None) - tray.setContextMenu(menu) - - # Check OS for window transparency compatibility and apply - if state.window_transparency and platform.system() != "Windows": - widget.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground) - transparent_colors = {"background": "#00000000", **custom_colors} - qdarktheme.setup_theme("auto", custom_colors=transparent_colors) set_main_window(widget) widget.show() + signal.signal(signal.SIGINT, signal.SIG_DFL) sys.exit(app.exec()) def keyboardinterrupthandler(signum, frame):