Ticket #8952: mythsystem_flags.diff

File mythsystem_flags.diff, 12.1 KB (added by stuartm, 9 years ago)

Possible fix

  • mythplugins/mythnetvision/mythnetvision/nettree.cpp

     
    820820        }
    821821        QString playerCommand = cmd + " " + args.join(" ");
    822822
    823         myth_system(playerCommand);
     823        myth_system(playerCommand, kMSDisableDrawing);
    824824    }
    825825    else
    826826    {
     
    856856            cmd.replace(";","\\;");
    857857
    858858            GetMythMainWindow()->AllowInput(false);
    859             myth_system(cmd, kMSDontDisableDrawing);
     859            myth_system(cmd);
    860860            GetMythMainWindow()->AllowInput(true);
    861861            return;
    862862        }
  • mythplugins/mythnetvision/mythnetvision/netsearch.cpp

     
    553553        }
    554554        QString playerCommand = cmd + " " + args.join(" ");
    555555
    556         myth_system(playerCommand);
     556        myth_system(playerCommand, kMSDisableDrawing);
    557557    }
    558558    else
    559559    {
     
    589589            cmd.replace(";","\\;");
    590590
    591591            GetMythMainWindow()->AllowInput(false);
    592             myth_system(cmd, kMSDontDisableDrawing);
     592            myth_system(cmd);
    593593            GetMythMainWindow()->AllowInput(true);
    594594            return;
    595595        }
  • mythplugins/mytharchive/mytharchive/main.cpp

     
    234234    {
    235235        if (command.contains("%f"))
    236236            command = command.replace(QRegExp("%f"), filename);
    237         myth_system(command);
     237        myth_system(command, kMSDisableDrawing);
    238238    }
    239239}
    240240
  • mythplugins/mythbrowser/mythbrowser/bookmarkmanager.cpp

     
    383383        cmd.replace(";","\\;");
    384384
    385385        GetMythMainWindow()->AllowInput(false);
    386         myth_system(cmd, kMSDontDisableDrawing);
     386        myth_system(cmd);
    387387        GetMythMainWindow()->AllowInput(true);
    388388
    389389        // we need to reload the bookmarks incase the user added/deleted
     
    603603        cmd.replace(";","\\;");
    604604
    605605        GetMythMainWindow()->AllowInput(false);
    606         myth_system(cmd, kMSDontDisableDrawing);
     606        myth_system(cmd);
    607607        GetMythMainWindow()->AllowInput(true);
    608608
    609609        // we need to reload the bookmarks incase the user added/deleted
  • mythplugins/mythgallery/mythgallery/glsingleview.cpp

     
    217217                QString path = QString("\"%1\"").arg(item->GetPath());
    218218
    219219                cmd.replace("%s", path);
    220                 myth_system(cmd);
     220                myth_system(cmd, kMSDisableDrawing);
    221221            }
    222222
    223223            if (!m_slideshow_running)
  • mythplugins/mythgallery/mythgallery/singleview.cpp

     
    197197                QString path = QString("\"%1\"").arg(item->GetPath());
    198198
    199199                cmd.replace("%s", path);
    200                 myth_system(cmd);
     200                myth_system(cmd, kMSDisableDrawing);
    201201            }
    202202
    203203            if (!m_slideshow_running)
  • mythplugins/mythvideo/mythvideo/main.cpp

     
    125125                        MediaMonitor::defaultVCDdevice());
    126126            }
    127127            sendPlaybackStart();
    128             myth_system(command_string);
     128            myth_system(command_string, kMSDisableDrawing);
    129129            sendPlaybackEnd();
    130130            GetMythMainWindow()->raise();
    131131            GetMythMainWindow()->activateWindow();
     
    184184                        command_string.replace(QRegExp("%d"), dvd_device);
    185185            }
    186186            sendPlaybackStart();
    187             myth_system(command_string);
     187            myth_system(command_string, kMSDisableDrawing);
    188188            sendPlaybackEnd();
    189189            if (GetMythMainWindow())
    190190            {
  • mythplugins/mythvideo/mythvideo/playercommand.cpp

     
    150150    bool Play() const
    151151    {
    152152        sendPlaybackStart();
    153         myth_system(m_play_command);
     153        myth_system(m_play_command, kMSDisableDrawing);
    154154        sendPlaybackEnd();
    155155
    156156        return true;
  • mythplugins/mythvideo/mythvideo/videodlg.cpp

     
    30933093        cmd.replace(";","\\;");
    30943094
    30953095        GetMythMainWindow()->AllowInput(false);
    3096         myth_system(cmd, kMSDontDisableDrawing);
     3096        myth_system(cmd);
    30973097        GetMythMainWindow()->AllowInput(true);
    30983098        return;
    30993099    }
  • mythplugins/mythgame/mythgame/gamehandler.cpp

     
    910910             ++cmd )
    911911        {
    912912            VERBOSE(VB_GENERAL, LOC + QString("Executing : %1").arg(*cmd));
    913             myth_system(*cmd);
     913            myth_system(*cmd, kMSDisableDrawing);
    914914        }
    915915    }
    916916    else
    917917    {
    918918        VERBOSE(VB_GENERAL, LOC + QString("Executing : %1").arg(exec));
    919         myth_system(exec);
     919        myth_system(exec, kMSDisableDrawing);
    920920    }
    921921
    922922    (void)d.cd(savedir);     
  • mythplugins/mythnews/mythnews/mythnews.cpp

     
    822822            cmd.replace(";","\\;");
    823823
    824824            GetMythMainWindow()->AllowInput(false);
    825             myth_system(cmd, kMSDontDisableDrawing);
     825            myth_system(cmd);
    826826            GetMythMainWindow()->AllowInput(true);
    827827            return;
    828828        }
     
    977977        if (command_string.contains("%s"))
    978978            command_string = command_string.replace("%s", filename);
    979979
    980         myth_system(command_string);
     980        myth_system(command_string, kMSDisableDrawing);
    981981    }
    982982
    983983    sendPlaybackEnd();
  • mythtv/libs/libmythdb/mythsystem.cpp

     
    305305        // down
    306306        flags &= ~kMSInUi;
    307307        flags |= kMSDontBlockInputDevs;
    308         flags |= kMSDontDisableDrawing;
    309308    }
    310309
    311310    // This needs to be a send event so that the MythUI locks the input devices
     
    320319    // This needs to be a send event so that the MythUI m_drawState change is
    321320    // flagged immediately instead of after existing events are processed
    322321    // since this function could be called inside one of those events.
    323     if( !(flags & kMSDontDisableDrawing) )
     322    if (flags & kMSDisableDrawing)
    324323    {
    325324        QEvent event(MythEvent::kPushDisableDrawingEventType);
    326325        QCoreApplication::sendEvent(gCoreContext->GetGUIObject(), &event);
     
    332331    // This needs to be a send event so that the MythUI m_drawState change is
    333332    // flagged immediately instead of after existing events are processed
    334333    // since this function could be called inside one of those events.
    335     if( !(flags & kMSDontDisableDrawing) )
     334    if (flags & kMSDisableDrawing)
    336335    {
    337336        QEvent event(MythEvent::kPopDisableDrawingEventType);
    338337        QCoreApplication::sendEvent(gCoreContext->GetGUIObject(), &event);
  • mythtv/libs/libmythdb/mythsystem.h

     
    88
    99typedef enum MythSystemMask {
    1010    kMSNone                     = 0x00000000,
    11     kMSDontBlockInputDevs       = 0x00000001, //< avoid blocking LIRC & Joystick Menu
    12     kMSDontDisableDrawing       = 0x00000002, //< avoid disabling UI drawing
     11    kMSDontBlockInputDevs       = 0x00000001, //< Blocking Input (Lirc, Joystick, etc)
     12    kMSDisableDrawing           = 0x00000002, //< Disable UI drawing
    1313    kMSRunBackground            = 0x00000004, //< run child in the background
    1414    kMSInUi                     = 0x00000008, //< the parent is in the UI
    1515} MythSystemFlag;
  • mythtv/programs/mythwelcome/welcomedialog.cpp

     
    107107    QString startFECmd = gCoreContext->GetSetting("MythWelcomeStartFECmd",
    108108                         m_installDir + "/bin/mythfrontend");
    109109
    110     myth_system(startFECmd);
     110    myth_system(startFECmd, kMSDisableDrawing);
    111111    updateAll();
    112112    m_frontendIsRunning = false;
    113113}
     
    288288        {
    289289            QString cmd = gCoreContext->GetSetting("MythShutdownXTermCmd", "");
    290290            if (!cmd.isEmpty())
    291                 myth_system(cmd);
     291                myth_system(cmd, kMSDisableDrawing);
    292292        }
    293293        else if (action == "STARTSETUP")
    294294        {
    295295            QString mythtv_setup = m_installDir + "/bin/mythtv-setup";
    296             myth_system(mythtv_setup);
     296            myth_system(mythtv_setup, kMSDisableDrawing);
    297297        }
    298298        else
    299299            handled = false;
  • mythtv/libs/libmythtv/previewgenerator.cpp

     
    241241
    242242        command += " > /dev/null";
    243243
    244         int ret = myth_system(command, kMSDontBlockInputDevs |
    245                                        kMSDontDisableDrawing);
     244        int ret = myth_system(command, kMSDontBlockInputDevs);
    246245        if (ret)
    247246        {
    248247            msg = QString("Encountered problems running '%1'").arg(command);
  • mythtv/libs/libmythui/screensaver-x11.cpp

     
    205205                VERBOSE(VB_PLAYBACK, LOC + "Calling xscreensaver-command -deactivate");
    206206                myth_system("xscreensaver-command -deactivate >&- 2>&- &",
    207207                            kMSDontBlockInputDevs |
    208                             kMSDontDisableDrawing |
    209208                            kMSRunBackground);
    210209            }
    211210            if (m_gscreensaverRunning)
     
    213212                VERBOSE(VB_PLAYBACK, LOC + "Calling gnome-screensaver-command --poke");
    214213                myth_system("gnome-screensaver-command --poke >&- 2>&- &",
    215214                            kMSDontBlockInputDevs |
    216                             kMSDontDisableDrawing |
    217215                            kMSRunBackground);
    218216            }
    219217            m_last_deactivated = current_time;