Ticket #7748: spontaneous.patch

File spontaneous.patch, 767 bytes (added by superm1@…, 14 years ago)
  • libs/libmythui/mythmainwindow.cpp

     
    673673
    674674void MythMainWindow::closeEvent(QCloseEvent *e)
    675675{
    676     QKeyEvent *key = new QKeyEvent(QEvent::KeyPress, d->escapekey,
     676    if (e->spontaneous())
     677    {
     678        QKeyEvent *key = new QKeyEvent(QEvent::KeyPress, d->escapekey,
    677679                                   Qt::NoModifier);
    678     QCoreApplication::postEvent(this, key);
    679     e->ignore();
     680        QApplication::postEvent(this, key);
     681        e->ignore();
     682    }
     683    else
     684        QWidget::closeEvent(e);
    680685}
    681686
    682687bool MythMainWindow::screenShot(QString fname, int x, int y,