Ticket #9421: 0001-Make-background-runs-not-block-the-foreground.patch

File 0001-Make-background-runs-not-block-the-foreground.patch, 1.6 KB (added by beirdo, 9 years ago)
  • mythtv/libs/libmythdb/mythsystem.cpp

    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) 
    224224        return;
    225225    }
    226226
     227    m_settings["IsInUI"] = gCoreContext->HasGUI() && gCoreContext->IsUIThread();
     228
    227229    if( flags & kMSRunBackground )
    228230        m_settings["RunInBackground"] = true;
    229231
    void MythSystem::ProcessFlags(uint flags) 
    237239        m_command = m_command.trimmed();
    238240        m_settings["RunInBackground"] = true;
    239241        m_settings["UseShell"]        = true;
     242        m_settings["IsInUI"]          = false;
    240243    }
    241244
    242     m_settings["IsInUI"] = gCoreContext->HasGUI() && gCoreContext->IsUIThread();
    243245    if( GetSetting("IsInUI") )
    244246    {
    245247        // Check for UI-only locks