From ca66e7ae8d42fab14425f376b0526083d37bb601 Mon Sep 17 00:00:00 2001
From: Gavin Hurlbut <ghurlbut@mythtv.org>
Date: Mon, 3 Jan 2011 16:30:49 -0800
Subject: [PATCH] Make background runs not block the foreground
This hopefully will fix #9421 (first report).
The problem with running in the background in from the menu XML is that it is
blocking the drawing, inputdevs, etc, and then launching in the background.
If in the background, there is no reason I can think of that we need to block
the UI thread. If the program launched in the background has focus, it should
be receiving the keyboard input. The only one think I'm wondering is if LIRC
will act oddly.
---
mythtv/libs/libmythdb/mythsystem.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/mythtv/libs/libmythdb/mythsystem.cpp b/mythtv/libs/libmythdb/mythsystem.cpp
index a647d29..c797fbd 100644
a
|
b
|
void MythSystem::ProcessFlags(uint flags) |
224 | 224 | return; |
225 | 225 | } |
226 | 226 | |
| 227 | m_settings["IsInUI"] = gCoreContext->HasGUI() && gCoreContext->IsUIThread(); |
| 228 | |
227 | 229 | if( flags & kMSRunBackground ) |
228 | 230 | m_settings["RunInBackground"] = true; |
229 | 231 | |
… |
… |
void MythSystem::ProcessFlags(uint flags) |
237 | 239 | m_command = m_command.trimmed(); |
238 | 240 | m_settings["RunInBackground"] = true; |
239 | 241 | m_settings["UseShell"] = true; |
| 242 | m_settings["IsInUI"] = false; |
240 | 243 | } |
241 | 244 | |
242 | | m_settings["IsInUI"] = gCoreContext->HasGUI() && gCoreContext->IsUIThread(); |
243 | 245 | if( GetSetting("IsInUI") ) |
244 | 246 | { |
245 | 247 | // Check for UI-only locks |