From 2939012b63991a79024d59e8d95e1d51f1680449 Mon Sep 17 00:00:00 2001 From: fy59 Date: Mon, 5 Oct 2026 18:01:28 +0200 Subject: [PATCH] fix(session): logout cleanly through UWSM --- .../labfy-sway/controlcenter/ControlCenter.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/quickshell/.config/quickshell/labfy-sway/controlcenter/ControlCenter.qml b/quickshell/.config/quickshell/labfy-sway/controlcenter/ControlCenter.qml index 4dba3893a..b8cf8c1e6 100644 --- a/quickshell/.config/quickshell/labfy-sway/controlcenter/ControlCenter.qml +++ b/quickshell/.config/quickshell/labfy-sway/controlcenter/ControlCenter.qml @@ -1,7 +1,6 @@ import QtQuick import QtQuick.Layouts import Quickshell -import Quickshell.I3 import Quickshell.Networking import Quickshell.Bluetooth import "../components" @@ -28,7 +27,8 @@ PopupWindow { command: ["systemctl", "suspend"] }, { id: "logout", label: "Déconnexion", icon: "", accent: Theme.urgent, confirmTitle: "Se déconnecter ?", - description: "La session SwayFX en cours sera fermée.", command: null }, + description: "La session SwayFX en cours sera fermée.", + command: ["uwsm", "stop"] }, { id: "reboot", label: "Redémarrer", icon: "", accent: Theme.warning, confirmTitle: "Redémarrer l'ordinateur ?", description: "La session en cours sera fermée.", @@ -63,8 +63,9 @@ PopupWindow { if (!selected) return; // Fermer le popup avant toute commande qui peut verrouiller ou terminer la session. visible = false; - if (id === "logout") I3.dispatch("exit"); - else Quickshell.execDetached(selected.command); + // CONTRACT: UWSM possède le cycle de vie de Sway ; son arrêt doit donc + // passer par la commande déclarée, comme les autres actions de session. + if (selected.command) Quickshell.execDetached(selected.command); } anchor.window: barWindow