Bug 467232 - After being launched from a shortcut, Spectacle creates screenshot file when asked to copy.
Summary: After being launched from a shortcut, Spectacle creates screenshot file when ...
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: git-master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-12 09:22 UTC by Oded Arbel
Modified: 2023-03-13 21:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 23.04
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oded Arbel 2023-03-12 09:22:30 UTC
SUMMARY
When opening the fullscreen region screenshotting UI using a keyboard shortcut, and then selecting "Copy", Spectactle still saves the screenshot to a file. When selecting "Save" from the screenshotting UI, Spectacle creates two image files.

STEPS TO REPRODUCE
1. Launch the "Capture Rectangular Region" action (default to Meta+Shift+Print)
2. Select a region
3. Click "Copy"

OBSERVED RESULT
A notification appears, saying that s new screenshot was saved to a file in the default pictures folder. The screenshot is also correctly copied to the clipboard.

EXPECTED RESULT
The screenshot should just be copied to the clipboard - a file should not be created.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  neon unstable
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.10.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
This is using the default configuration (I removed the `~/.config/spectaclerc` file), which has the "After taking a screenshot:" set with "Save file to default folder" unchecked and also "Do not copy anything".

If the on the region screenshotting UI the user clicks on "Save", Spectacle will create two files in the default folder - one named "Screenshot_DATE_TIME.png" and the other named "Screenshot_DATE_TIME-1.png" - and will also show two notifications, one for each of the files that was created.

This may be related to bug 433442 ?
Comment 1 Nate Graham 2023-03-13 21:24:51 UTC
Like Bug 467231, I think this is actually fixed (it works for me with current git master) but the Neon packages may be behind and don't have the fix yet. Let's wait until we get some clarity on that in Bug 467231.
Comment 2 Nate Graham 2023-03-13 21:30:05 UTC
Per 467231#c3, as I suspected, Neon Unstable's packages are old and don't include https://invent.kde.org/graphics/spectacle/-/commit/fc2d625144536b53e5f3e671341b4a5651857cf2 which fixed this issue.
Comment 3 Oded Arbel 2023-03-13 21:44:46 UTC
(In reply to Nate Graham from comment #2)
> Per 467231#c3, as I suspected, Neon Unstable's packages are old and don't
> include
> https://invent.kde.org/graphics/spectacle/-/commit/
> fc2d625144536b53e5f3e671341b4a5651857cf2 which fixed this issue.

I've verified that this issue also does not appear on my local build from git master.