From 2c3eb6efdab4c75ab70eb914b24150cc4b456a8a Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Tue, 16 Sep 2025 12:09:12 -0400 Subject: [PATCH] Launcher: AppPlugin, close panel immediately to avoid focusing issues. --- Modules/Launcher/Plugins/ApplicationsPlugin.qml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Modules/Launcher/Plugins/ApplicationsPlugin.qml b/Modules/Launcher/Plugins/ApplicationsPlugin.qml index e6eced4..2d21a5f 100644 --- a/Modules/Launcher/Plugins/ApplicationsPlugin.qml +++ b/Modules/Launcher/Plugins/ApplicationsPlugin.qml @@ -79,8 +79,11 @@ Item { "icon": app.icon || "application-x-executable", "isImage": false, "onActivate": function () { - Logger.log("ApplicationsPlugin", `Launching: ${app.name}`) + // Close the launcher/NPanel immediately without any animations. + // Ensures we are not preventing the future focusing of the app + launcher.closeCompleted() + Logger.log("ApplicationsPlugin", `Launching: ${app.name}`) if (Settings.data.appLauncher.useApp2Unit && app.id) { Logger.log("ApplicationsPlugin", `Using app2unit for: ${app.id}`) if (app.runInTerminal) @@ -89,11 +92,9 @@ Item { Quickshell.execDetached(["app2unit", "--"].concat(app.command)) } else if (app.execute) { app.execute() - } else if (app.exec) { - // Fallback to manual execution - Process.execute(app.exec) + } else { + Logger.log("ApplicationsPlugin", `Could not launch: ${app.name}`) } - launcher.close() } } }