From a32f3c7d937e37a05b450abd659b64e4ca3d842a Mon Sep 17 00:00:00 2001 From: Adrian Date: Mon, 20 Mar 2023 02:25:05 -0400 Subject: [PATCH] Make sure GUI is active while displaying help --- about.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/about.cpp b/about.cpp index 0e7d4fae..2111d0dd 100644 --- a/about.cpp +++ b/about.cpp @@ -15,10 +15,11 @@ void displayDoc(const QString &url, const QString &title) bool started_as_root = false; // prefer mx-viewer otherwise use xdg-open (use runuser to run that as logname user) if (QFile::exists(QStringLiteral("/usr/bin/mx-viewer"))) { - QProcess::execute(QStringLiteral("mx-viewer"), {url, title}); + QProcess::startDetached(QStringLiteral("mx-viewer"), {url, title}); } else { if (getuid() != 0) { - QProcess::execute(QStringLiteral("xdg-open"), {url}); + QProcess::startDetached(QStringLiteral("xdg-open"), {url}); + return; } else { QProcess proc; proc.start(QStringLiteral("logname"), {}, QIODevice::ReadOnly);