Update Screenshot dbus interface

Also mark shouldReturnNativeSize to true since we want to get correctly
scaled screenshot.
This commit is contained in:
Bhushan Shah 2020-10-19 20:50:31 +05:30
parent 6168813d13
commit c9ca9dac10
2 changed files with 119 additions and 113 deletions

View file

@ -38,6 +38,11 @@
<method name="screenshotFullscreen">
<arg type="s" direction="out"/>
</method>
<method name="screenshotFullscreen">
<arg name="fd" type="h" direction="in"/>
<arg name="captureCursor" type="b" direction="in"/>
<arg name="shouldReturnNativeSize" type="b" direction="in"/>
</method>
<method name="screenshotFullscreen">
<arg name="fd" type="h" direction="in"/>
<arg name="captureCursor" type="b" direction="in"/>
@ -112,3 +117,4 @@
</method>
</interface>
</node>

View file

@ -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()) {