panel: ask KWin for native resolution screenshots

Potentially fixes the broken screenshots with GLES
This commit is contained in:
Bhushan Shah 2021-12-04 19:23:55 +05:30 committed by Bhushan Shah
parent be17e3d69b
commit 9711d4af10

View file

@ -197,7 +197,12 @@ void PhonePanel::takeScreenshot()
}
// We don't have access to the ScreenPool so we'll just take the first screen
auto pendingCall = m_screenshotInterface->CaptureScreen(qGuiApp->screens().constFirst()->name(), {}, QDBusUnixFileDescriptor(lPipeFds[1]));
QVariantMap options;
options.insert(QStringLiteral("native-resolution"), true);
auto pendingCall = m_screenshotInterface->CaptureScreen(
qGuiApp->screens().constFirst()->name(), options,
QDBusUnixFileDescriptor(lPipeFds[1]));
close(lPipeFds[1]);
auto pipeFileDescriptor = lPipeFds[0];