Commit 23cbec2c authored by Antonio Prcela's avatar Antonio Prcela 🏞 Committed by Bharadwaj Raju
Browse files

Check for right/middle click in Platform*.cpp

parent 2f9bbbfc
......@@ -90,6 +90,9 @@ public:
QTimer::singleShot(0, [this]() {
mPlatformPtr->doGrabNow(mGrabMode, mIncludePointer, mIncludeDecorations);
});
} else if (lSecondEvent->detail == 2 || lSecondEvent->detail == 3) {
// 2: middle click, 3: right click; both cancel
Q_EMIT mPlatformPtr->newScreenshotTaken(QPixmap());
} else if (lSecondEvent->detail < 4) {
Q_EMIT mPlatformPtr->newScreenshotFailed();
} else {
......
......@@ -408,9 +408,7 @@ void SpectacleCore::screenshotFailed()
Q_EMIT allDone();
return;
case StartMode::Gui:
if (ExportManager::instance()->captureMode() != Spectacle::CaptureMode::RectangularRegion) {
mMainWindow->screenshotFailed();
}
mMainWindow->screenshotFailed();
mMainWindow->setScreenshotAndShow(QPixmap());
}
}
......
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