Commit a7aa089e authored by Méven Car's avatar Méven Car

ScreenshotEffect: fix ordering of screens in screenshotScreens

parent de4e429a
......@@ -720,11 +720,9 @@ void ScreenShotEffect::screenshotScreens(QDBusUnixFileDescriptor fd, const QStri
const QList<QScreen *> screens = QGuiApplication::screens();
QStringList lscreensNames = screensNames;
for (const QScreen *screen : screens) {
const int indexName = lscreensNames.indexOf(screen->name());
const int indexName = screensNames.indexOf(screen->name());
if (indexName != -1) {
lscreensNames.removeAt(indexName);
const auto screenGeom = screen->geometry();
if (!screenGeom.isValid()) {
close(m_fd);
......@@ -737,10 +735,10 @@ void ScreenShotEffect::screenshotScreens(QDBusUnixFileDescriptor fd, const QStri
}
}
if (!lscreensNames.isEmpty()) {
if (m_orderImg.size() != screensNames.size()) {
close(m_fd);
clearState();
sendErrorReply(s_errorScreenMissing, s_errorScreenMissingMsg + " : " + lscreensNames.join(", "));
sendErrorReply(s_errorScreenMissing, s_errorScreenMissingMsg);
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment