diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt
index 73dd8bb884..9142a5738b 100644
--- a/effects/CMakeLists.txt
+++ b/effects/CMakeLists.txt
@@ -20,6 +20,7 @@ set(kwin_effect_KDE_LIBS
KF5::Plasma # screenedge effect
KF5::IconThemes
KF5::Service
+ KF5::Notifications # screenshot effect
)
set(kwin_effect_QT_LIBS
diff --git a/effects/screenshot/screenshot.cpp b/effects/screenshot/screenshot.cpp
index b01bacd553..86e12cd5aa 100644
--- a/effects/screenshot/screenshot.cpp
+++ b/effects/screenshot/screenshot.cpp
@@ -30,6 +30,9 @@ along with this program. If not, see .
#include
#include
+#include
+#include
+
namespace KWin
{
@@ -240,6 +243,10 @@ QString ScreenShotEffect::saveTempImage(const QImage &img)
}
img.save(&temp);
temp.close();
+ KNotification::event(KNotification::Notification,
+ i18nc("Notification caption that a screenshot got saved to file", "Screenshot"),
+ i18nc("Notification with path to screenshot file", "Screenshot saved to %1", temp.fileName()),
+ QStringLiteral("spectacle"));
return temp.fileName();
}