Attempt more fixes for waiting state
This commit is contained in:
@@ -1454,11 +1454,13 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event)
|
||||
if (receiver == this) {
|
||||
static auto curdopause = dopause;
|
||||
if (event->type() == QEvent::WindowBlocked) {
|
||||
window_blocked = true;
|
||||
curdopause = dopause;
|
||||
plat_pause(isShowMessage ? 2 : 1);
|
||||
emit setMouseCapture(false);
|
||||
releaseKeyboard();
|
||||
} else if (event->type() == QEvent::WindowUnblocked) {
|
||||
window_blocked = false;
|
||||
plat_pause(curdopause);
|
||||
}
|
||||
}
|
||||
@@ -2112,7 +2114,7 @@ MainWindow::updateUiPauseState()
|
||||
QString(tr("Pause execution"));
|
||||
ui->actionPause->setIcon(pause_icon);
|
||||
ui->actionPause->setToolTip(tooltip_text);
|
||||
emit vmmRunningStateChanged(static_cast<VMManagerProtocol::RunningState>(dopause));
|
||||
emit vmmRunningStateChanged(static_cast<VMManagerProtocol::RunningState>(window_blocked ? (dopause ? VMManagerProtocol::RunningState::PausedWaiting : VMManagerProtocol::RunningState::RunningWaiting) : (VMManagerProtocol::RunningState)dopause));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user