diff --git a/mythtv/libs/libmythui/mythmainwindow.cpp b/mythtv/libs/libmythui/mythmainwindow.cpp
index 7346643a5b..825a092b68 100644
a
|
b
|
MythMainWindow::MythMainWindow(const bool useDB) |
506 | 506 | connect(this, SIGNAL(signalSetDrawEnabled(bool)), |
507 | 507 | this, SLOT(SetDrawEnabled(bool)), |
508 | 508 | Qt::BlockingQueuedConnection); |
| 509 | #ifdef Q_OS_ANDROID |
| 510 | connect(qApp, SIGNAL(applicationStateChanged(Qt::ApplicationState)), |
| 511 | this, SLOT(onApplicationStateChange(Qt::ApplicationState))); |
| 512 | #endif |
509 | 513 | |
510 | 514 | // We need to listen for playback start/end events |
511 | 515 | gCoreContext->addListener(this); |
… |
… |
void MythMainWindow::DisableIdleTimer(bool disableIdle) |
3146 | 3150 | QMetaObject::invokeMethod(d->m_idleTimer, "start"); |
3147 | 3151 | } |
3148 | 3152 | |
| 3153 | void MythMainWindow::onApplicationStateChange(Qt::ApplicationState state) |
| 3154 | { |
| 3155 | LOG(VB_GENERAL, LOG_NOTICE, QString("Application State Changed to %1").arg(state)); |
| 3156 | switch (state) |
| 3157 | { |
| 3158 | case Qt::ApplicationState::ApplicationActive: |
| 3159 | PopDrawDisabled(); |
| 3160 | break; |
| 3161 | case Qt::ApplicationState::ApplicationSuspended: |
| 3162 | PushDrawDisabled(); |
| 3163 | break; |
| 3164 | default: |
| 3165 | break; |
| 3166 | } |
| 3167 | } |
3149 | 3168 | /* vim: set expandtab tabstop=4 shiftwidth=4: */ |
diff --git a/mythtv/libs/libmythui/mythmainwindow.h b/mythtv/libs/libmythui/mythmainwindow.h
index 876b51ee19..650a220887 100644
a
|
b
|
class MUI_PUBLIC MythMainWindow : public QWidget |
150 | 150 | void animate(); |
151 | 151 | void doRemoteScreenShot(QString filename, int x, int y); |
152 | 152 | void SetDrawEnabled(bool enable); |
| 153 | void onApplicationStateChange(Qt::ApplicationState state); |
153 | 154 | |
154 | 155 | signals: |
155 | 156 | void signalRemoteScreenShot(QString filename, int x, int y); |