diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2021-01-05 07:06:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-05 07:06:50 -0500 |
| commit | e3e54bc8d3d4a5219c7f2c1f6338b7ecc5d1e8ec (patch) | |
| tree | f49d0d0eab8591df4c3dc367d114277445b3dc03 /src/commandline.cpp | |
| parent | 09f07ddae96c741d12e49754710369b57e8c3993 (diff) | |
| parent | 24a6749157c60808e6734519abefce784cbabe82 (diff) | |
Merge pull request #1342 from isanae/shortcut-nolock
Fix running shortcuts with locking disabled
Diffstat (limited to 'src/commandline.cpp')
| -rw-r--r-- | src/commandline.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/commandline.cpp b/src/commandline.cpp index bb9ff9b8..8c722990 100644 --- a/src/commandline.cpp +++ b/src/commandline.cpp @@ -206,9 +206,11 @@ std::optional<int> CommandLine::setupCore(OrganizerCore& organizer) const if (m_shortcut.isValid()) { if (m_shortcut.hasExecutable()) { try { + // make sure MO doesn't exit even if locking is disabled, ForceWait and + // PreventExit will do that organizer.processRunner() .setFromShortcut(m_shortcut) - .setWaitForCompletion() + .setWaitForCompletion(ProcessRunner::ForceWait, UILocker::PreventExit) .run(); return 0; @@ -229,9 +231,12 @@ std::optional<int> CommandLine::setupCore(OrganizerCore& organizer) const try { // pass the remaining parameters to the binary + // + // make sure MO doesn't exit even if locking is disabled, ForceWait and + // PreventExit will do that organizer.processRunner() .setFromFileOrExecutable(exeName, m_untouched) - .setWaitForCompletion() + .setWaitForCompletion(ProcessRunner::ForceWait, UILocker::PreventExit) .run(); return 0; |
