From 9711d4af1063d7aac4b7863065655452f0a5208e Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Sat, 4 Dec 2021 19:23:55 +0530 Subject: [PATCH] panel: ask KWin for native resolution screenshots Potentially fixes the broken screenshots with GLES --- containments/panel/phonepanel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/containments/panel/phonepanel.cpp b/containments/panel/phonepanel.cpp index a906807f..0ef24ddc 100644 --- a/containments/panel/phonepanel.cpp +++ b/containments/panel/phonepanel.cpp @@ -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];