1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00

Add Window termination on error to avoid zombie windows

This commit is contained in:
Elias Steurer 2021-07-16 16:46:40 +02:00
parent 59758487b4
commit 536813e52d

View File

@ -182,6 +182,15 @@ WinWindow::WinWindow(
connect(sdk(), &ScreenPlaySDK::incommingMessage, this, &WinWindow::messageReceived);
connect(sdk(), &ScreenPlaySDK::replaceWallpaper, this, &WinWindow::replaceWallpaper);
connect(&m_checkForFullScreenWindowTimer, &QTimer::timeout, this, &WinWindow::checkForFullScreenWindow);
connect(
&m_window, &QQuickView::statusChanged,
this, [](auto status) {
if (status == QQuickView::Status::Error) {
qInfo() << status;
QCoreApplication::exit(-1);
}
},
Qt::QueuedConnection);
const auto screens = QApplication::screens();
for (const auto& screen : screens) {