diff --git a/containments/panel/phonepanel.cpp b/containments/panel/phonepanel.cpp index 3455fffc..ab9d43d4 100644 --- a/containments/panel/phonepanel.cpp +++ b/containments/panel/phonepanel.cpp @@ -22,8 +22,10 @@ #include #include -#include #include +#include +#include +#include #include #include #include @@ -81,7 +83,11 @@ void PhonePanel::toggleTorch() void PhonePanel::takeScreenshot() { auto *interface = new org::kde::kwin::Screenshot(QStringLiteral("org.kde.KWin"), QStringLiteral("/Screenshot"), QDBusConnection::sessionBus(), this); - QDBusPendingReply reply = interface->screenshotFullscreen(); + + // screenshot fullscreen currently doesn't work on all devices -> we need to use screenshot area + // this won't work with multiple screens + QSize screenSize = QGuiApplication::primaryScreen()->size(); + QDBusPendingReply reply = interface->screenshotArea(0, 0, screenSize.width(), screenSize.height()); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [=](QDBusPendingCallWatcher *watcher) {