From 68e60f036d2e4640630eef99573a50adff2f0751 Mon Sep 17 00:00:00 2001 From: bbedward Date: Mon, 20 Jul 2026 16:07:41 -0400 Subject: [PATCH] polkit: fix DMS_DISABLE_POLKIT regression from qs 0.2 deprecation commit fixes #2897 port 1.5 --- quickshell/Services/PolkitAgentInstance.qml | 3 +++ quickshell/Services/PolkitService.qml | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 quickshell/Services/PolkitAgentInstance.qml diff --git a/quickshell/Services/PolkitAgentInstance.qml b/quickshell/Services/PolkitAgentInstance.qml new file mode 100644 index 000000000..0b49622e2 --- /dev/null +++ b/quickshell/Services/PolkitAgentInstance.qml @@ -0,0 +1,3 @@ +import Quickshell.Services.Polkit + +PolkitAgent {} diff --git a/quickshell/Services/PolkitService.qml b/quickshell/Services/PolkitService.qml index 5adc4af43..de59bac97 100644 --- a/quickshell/Services/PolkitService.qml +++ b/quickshell/Services/PolkitService.qml @@ -3,7 +3,6 @@ pragma ComponentBehavior: Bound import QtQuick import Quickshell -import Quickshell.Services.Polkit Singleton { id: root @@ -12,10 +11,13 @@ Singleton { readonly property bool disablePolkitIntegration: Quickshell.env("DMS_DISABLE_POLKIT") === "1" readonly property bool polkitAvailable: !disablePolkitIntegration - readonly property alias agent: polkitAgentInstance + readonly property var agent: polkitAgentLoader.item - PolkitAgent { - id: polkitAgentInstance + Loader { + id: polkitAgentLoader + active: root.polkitAvailable + asynchronous: false + source: "PolkitAgentInstance.qml" } Component.onCompleted: {