Ticket #8952: paint.patch

File paint.patch, 1.3 KB (added by john.p.harvey@…, 9 years ago)
  • mythtv/libs/libmythui/mythmainwindow.cpp

     
    172172        m_drawDisabledDepth(0),
    173173        m_drawEnabled(true),
    174174
    175         m_themeBase(NULL)
     175        m_themeBase(NULL),
     176        m_updatedWhileDisabled(false)
    176177    {
    177178    }
    178179
     
    252253    bool m_drawEnabled;
    253254
    254255    MythThemeBase *m_themeBase;
     256    bool m_updatedWhileDisabled;
    255257};
    256258
    257259// Make keynum in QKeyEvent be equivalent to what's in QKeySequence
     
    822824
    823825bool MythMainWindow::event(QEvent *e)
    824826{
     827    if (!updatesEnabled() && (e->type() == QEvent::UpdateRequest))
     828        d->m_updatedWhileDisabled == true;
     829
    825830    if (e->type() == QEvent::Show && !e->spontaneous())
    826831    {
    827832        QCoreApplication::postEvent(
     
    12541259
    12551260    if (enable)
    12561261    {
    1257         repaint(); // See #8952
     1262        if (d->m_updatedWhileDisabled)
     1263        {
     1264            QApplication::postEvent(this, new QEvent(QEvent::UpdateRequest), Qt::LowEventPriority);
     1265            d->m_updatedWhileDisabled = false;
     1266        }
    12581267        d->drawTimer->start(1000 / 70);
     1268
    12591269    }
    12601270    else
    12611271        d->drawTimer->stop();
    12621272
     1273
    12631274    d->m_setDrawEnabledWait.wakeAll();
    12641275}
    12651276