From 22bfb00eb270512d99c4df20f55449ef8bb5444a Mon Sep 17 00:00:00 2001 From: Eriq Taing Date: Sat, 27 Sep 2025 21:36:26 -0400 Subject: [PATCH] Move process to root of powerbutton --- bar/PowerButton.qml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bar/PowerButton.qml b/bar/PowerButton.qml index 173088e..fb18d0a 100644 --- a/bar/PowerButton.qml +++ b/bar/PowerButton.qml @@ -11,16 +11,19 @@ Item { height: parent.height implicitWidth: parent.height + Process { + id: powermenu + running: false + command: [ "wlogout" ] + } + MouseArea { anchors.fill: parent acceptedButtons: Qt.LeftButton onPressed: (event) => { - powermenu.exec({}); - } - Process { - id: powermenu - running: false - command: [ "wlogout" ] + if (!powermenu.running){ + powermenu.exec({}); + } } }