Bug 427645 - "Could not take screenshot" when cancelling region selector
Summary: "Could not take screenshot" when cancelling region selector
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Other Linux
: VHI normal
Target Milestone: ---
Assignee: Méven Car
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-10-13 17:20 UTC by Kai Uwe Broulik
Modified: 2020-10-14 07:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2020-10-13 17:20:17 UTC
SUMMARY
When cancelling the region selector in Spectacle it says "Could not take screenshot. Please report this bug here: create a spectacle bug" even though I explicitly canceled.

STEPS TO REPRODUCE
1. Start Spectacle
2. Choose Rectangular Region
3. Click "Take screenshot"
4. In the resulting screen where it asks to draw a rectangle hit Escape

OBSERVED RESULT
Get an error message in Spectacle

EXPECTED RESULT
No error message because I canceled, which might technically be an error but not from the user's perspective.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.20.0
KDE Frameworks Version: 5.57
Qt Version: 5.15.0
on X11
Comment 1 Nate Graham 2020-10-13 18:53:17 UTC
Confirmed.

Can you investigate, Méven?
Comment 2 Bug Janitor Service 2020-10-13 20:37:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/30
Comment 3 Antonio Prcela 2020-10-13 20:38:22 UTC
We might have to split screenshotFailed() into screenshotCanceled().
I gave it a try:

https://invent.kde.org/graphics/spectacle/-/merge_requests/30
Comment 4 Antonio Prcela 2020-10-14 07:14:29 UTC
Git commit ba92b650839ec59d7274a8309c22df8a64766ea5 by Antonio Prcela.
Committed on 13/10/2020 at 20:34.
Pushed by meven into branch 'master'.

Separate messages for a failed and canceled screenshot

Add a new function that gets called when an screenshot has been canceled.

M  +5    -0    src/Gui/KSMainWindow.cpp
M  +1    -0    src/Gui/KSMainWindow.h
M  +9    -1    src/SpectacleCore.cpp
M  +1    -0    src/SpectacleCore.h

https://invent.kde.org/graphics/spectacle/commit/ba92b650839ec59d7274a8309c22df8a64766ea5