STEPS TO REPRODUCE 1. use Wayland session 2. make sure "Autosave file to default folder" is unchecked and "Copy file location to clipboard" is selected in Spectacle settings 3. close Spectacle 4. take a screenshot by pressing shift+printscreen OBSERVED RESULT screenshot is saved to disk and file location is not copied to clipboard EXPECTED RESULT screenshot should not be saved, file location should be copied to clipboard SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.23.80 KDE Frameworks Version: 5.88.0 Qt Version: 5.15.3 Graphics Platform: Wayland
(In reply to Patrick Silva from comment #0) > EXPECTED RESULT > screenshot should not be saved, file location should be copied to clipboard Well, it's not possible to copy the location of a screenshot that does not exist. lol On X11, a screenshot taken via keyboard shortcut is saved to default folder even if "Autosave file to default folder" is unchecked in Spectacle settings and its location is copied to clipboard. This is the expected result.
Also file location is not copied when I take a screenshot by clicking on 'Take a new screensot' button.
More info: When I open Spectacle by pressing printscreen key, Spectacle displays an inline message saying "...and its location has been copied to clipboard", but nothing is copied to clipboard. Then I click on "Take a new screenshot" button, Spectacle displays the same inline message and again nothing is copied to clipboard. However, if I save the screenshot, the file location is copied to clipboard as expected. Please watch the attached screens recording.
Created attachment 142796 [details] screeen recording
1. make sure 'After taking a screenshot: Save file to default folder' is unchecked and 'Copy file location to clipboard' option from the combobox below 'Save file to default folder' is selected 2. if Spectacle is open, close it 3. take a screenshot by pressing shift+printscreen Observed result: Plasma shows a notification saying: 'A screenshot was saved as 'Screenshot_20220523_074700.png' to '/location/of/the/screenshot' and the file path of the screenshot has been saved to your clipboard.' The screenshot was saved but its path was not copied to clipboard. Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.25.80 KDE Frameworks Version: 5.95.0 Qt Version: 5.15.4 Graphics Platform: Wayland
In fact currently the location is not copied to clipboard even when 'Save file to default folder' is checked in Spectacle settings.
So there are multiple bugs described in here: 1. If autosave is off and copy-location is on, Spectacle main window will display a false message that the image has been saved and its location copied, despite none of the two things happening. 2. If autosave is off and copy-location is on and Spectacle is not running and you take screenshot with a shortcut, it actually does save the image but falsely says in the notification that its location has been copied. 3. If autosave is on and copy-location is on and Spectacle is not running and you take screenshot with a shortcut, it saves the image but doesn't copy location (and falsely says that it did). For (2) I'm not sure what can sensibly be done in such a case. Just show a notification with the image without saving or copying anything at all? Should the notification be persistent in that case?
For one I think the "copy location to clipboard" shouldn't even be selectable when autosave is off. The combination doesn't make sense
See also https://bugs.kde.org/show_bug.cgi?id=446884
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/158
Git commit c431ab3d2586d9e9377957307540414d48c92b75 by Bharadwaj Raju. Committed on 11/10/2022 at 11:44. Pushed by bharadwaj-raju into branch 'master'. Fix copying path to clipboard in ExportManager We should be using KSystemClipboard there, not QApplication::clipboard or such M +3 -1 src/ExportManager.cpp https://invent.kde.org/graphics/spectacle/commit/c431ab3d2586d9e9377957307540414d48c92b75