From c9ca9dac1056c4755abe2097ce26a95b23b18db7 Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Mon, 19 Oct 2020 20:50:31 +0530 Subject: [PATCH] Update Screenshot dbus interface Also mark shouldReturnNativeSize to true since we want to get correctly scaled screenshot. --- .../panel/dbus/org.kde.KWin.Screenshot.xml | 228 +++++++++--------- containments/panel/phonepanel.cpp | 4 +- 2 files changed, 119 insertions(+), 113 deletions(-) diff --git a/containments/panel/dbus/org.kde.KWin.Screenshot.xml b/containments/panel/dbus/org.kde.KWin.Screenshot.xml index 0d2d92cb..09ab8ff8 100644 --- a/containments/panel/dbus/org.kde.KWin.Screenshot.xml +++ b/containments/panel/dbus/org.kde.KWin.Screenshot.xml @@ -1,114 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/containments/panel/phonepanel.cpp b/containments/panel/phonepanel.cpp index e61d567c..7a3cf10a 100644 --- a/containments/panel/phonepanel.cpp +++ b/containments/panel/phonepanel.cpp @@ -86,7 +86,7 @@ PhonePanel::~PhonePanel() = default; void PhonePanel::executeCommand(const QString &command) { qWarning() << "Executing" << command; - QProcess::startDetached(command); + QProcess::startDetached(command, QStringList()); } void PhonePanel::toggleTorch() @@ -169,7 +169,7 @@ void PhonePanel::takeScreenshot() return; } // Take fullscreen screenshot, and no pointer - QDBusPendingCall pcall = m_screenshotInterface->screenshotFullscreen(QDBusUnixFileDescriptor(lPipeFds[1]), false); + QDBusPendingCall pcall = m_screenshotInterface->screenshotFullscreen(QDBusUnixFileDescriptor(lPipeFds[1]), false, true); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this); QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [](QDBusPendingCallWatcher* watcher) { if (watcher->isError()) {