mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-02-10 20:44:00 +00:00
Remove Wayland duplicated screenshots after dbus calls
This commit is contained in:
@@ -50,6 +50,8 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool &ok) {
|
||||
QDBusReply<bool> reply = gnomeInterface.call("Screenshot", false, false, path);
|
||||
if (reply.value()) {
|
||||
res = QPixmap(path);
|
||||
QFile dbusResult(path);
|
||||
dbusResult.remove();
|
||||
} else {
|
||||
ok = false;
|
||||
}
|
||||
@@ -61,6 +63,10 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool &ok) {
|
||||
QStringLiteral("org.kde.kwin.Screenshot"));
|
||||
QDBusReply<QString> reply = kwinInterface.call("screenshotFullscreen");
|
||||
res = QPixmap(reply.value());
|
||||
if (!res.isNull()) {
|
||||
QFile dbusResult(reply.value());
|
||||
dbusResult.remove();
|
||||
}
|
||||
break;
|
||||
} default:
|
||||
ok = false;
|
||||
|
||||
Reference in New Issue
Block a user