Commit dd88afd3 authored by Bharadwaj Raju's avatar Bharadwaj Raju 📚
Browse files

Don't show an error message when user cancels screenshot in progress on Wayland

parent 8a56017d
......@@ -75,7 +75,12 @@ ScreenShotSource2::ScreenShotSource2(const QString &methodName, ArgType... argum
if (reply.isError()) {
qWarning() << "Screenshot request failed:" << reply.error().message();
Q_EMIT errorOccurred();
if (reply.error().name() == QStringLiteral("org.kde.KWin.ScreenShot2.Error.Cancelled")) {
// don't show error on user cancellation
Q_EMIT finished(m_result);
} else {
Q_EMIT errorOccurred();
}
} else {
handleMetaDataReceived(reply);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment