Attempt more fixes for waiting state
This commit is contained in:
@@ -1454,11 +1454,13 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event)
|
|||||||
if (receiver == this) {
|
if (receiver == this) {
|
||||||
static auto curdopause = dopause;
|
static auto curdopause = dopause;
|
||||||
if (event->type() == QEvent::WindowBlocked) {
|
if (event->type() == QEvent::WindowBlocked) {
|
||||||
|
window_blocked = true;
|
||||||
curdopause = dopause;
|
curdopause = dopause;
|
||||||
plat_pause(isShowMessage ? 2 : 1);
|
plat_pause(isShowMessage ? 2 : 1);
|
||||||
emit setMouseCapture(false);
|
emit setMouseCapture(false);
|
||||||
releaseKeyboard();
|
releaseKeyboard();
|
||||||
} else if (event->type() == QEvent::WindowUnblocked) {
|
} else if (event->type() == QEvent::WindowUnblocked) {
|
||||||
|
window_blocked = false;
|
||||||
plat_pause(curdopause);
|
plat_pause(curdopause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2112,7 +2114,7 @@ MainWindow::updateUiPauseState()
|
|||||||
QString(tr("Pause execution"));
|
QString(tr("Pause execution"));
|
||||||
ui->actionPause->setIcon(pause_icon);
|
ui->actionPause->setIcon(pause_icon);
|
||||||
ui->actionPause->setToolTip(tooltip_text);
|
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
|
void
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ private:
|
|||||||
QIcon caps_icon_off, scroll_icon_off, num_icon_off, kana_icon_off;
|
QIcon caps_icon_off, scroll_icon_off, num_icon_off, kana_icon_off;
|
||||||
|
|
||||||
bool isShowMessage = false;
|
bool isShowMessage = false;
|
||||||
|
bool window_blocked = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QT_MAINWINDOW_HPP
|
#endif // QT_MAINWINDOW_HPP
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ private:
|
|||||||
QString server_name;
|
QString server_name;
|
||||||
QLocalSocket *socket;
|
QLocalSocket *socket;
|
||||||
bool server_connected;
|
bool server_connected;
|
||||||
bool window_blocked;
|
bool window_blocked = false;
|
||||||
void connected() const;
|
void connected() const;
|
||||||
void disconnected() const;
|
void disconnected() const;
|
||||||
static void connectionError(QLocalSocket::LocalSocketError socketError);
|
static void connectionError(QLocalSocket::LocalSocketError socketError);
|
||||||
|
|||||||
Reference in New Issue
Block a user