Skip to content

Commit

Permalink
Make sure GUI is active while displaying help
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianTM committed Mar 20, 2023
1 parent daa4750 commit a32f3c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a32f3c7

Please sign in to comment.