Bug 454282 - Screenshots are saved to the folder even if disabled
Summary: Screenshots are saved to the folder even if disabled
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 21.12.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
: 453127 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-05-23 16:14 UTC by djsapsan@gmail.com
Modified: 2022-06-27 09:47 UTC (History)
8 users (show)

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


Attachments
checkbox (9.57 KB, image/png)
2022-05-23 16:14 UTC, djsapsan@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description djsapsan@gmail.com 2022-05-23 16:14:55 UTC
Created attachment 149140 [details]
checkbox

SUMMARY
***
Screenshots are saved to the folder even if disabled. This happens always when using shortcuts.
BUT! When I open the application window and then doing shots, the files are not created, as it must be.
I'm doing tons of screenshots just to quickly put in messengers. I dont need to waste my SSD.
***


STEPS TO REPRODUCE
1. Use any printscreen shortcut while the app is closed
2. new file is in the folder

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 djsapsan@gmail.com 2022-05-23 16:26:11 UTC
My OS
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-30-generic (64-bit)
Graphics Platform: X11
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 31,3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2060/PCIe/SSE2
Comment 2 Antonio Prcela 2022-05-23 21:17:45 UTC
Where does it save the images?
Can't reproduce it. At least it's not saving into the folder set in "Settings - Save - Save location"
Comment 3 djsapsan@gmail.com 2022-05-23 21:28:05 UTC
To the default ~/Pictures/

I've checked again. So it's broken when using rectangle area shortcut. When just press print scr, then the app simply opens.

All settings:
https://prnt.sc/47jCAEPf64EI
Comment 4 jfitzw7 2022-05-24 10:55:16 UTC
Can confirm I'm getting the same result myself. Using the Capture Region or Capture Monitor hotkeys with Spectacle closed, it both copies the capture to clipboard and saves it as a file in the location I set in the program. Same OS and Settings as the OP.
Interestingly, if I press the hotkey again after it saves, there's around a 15 second period in which it'll work as intended: The capture will just be copied to the clipboard without saving.
Comment 5 angeloborsoiross 2022-06-14 12:27:44 UTC
I've been able to replicate this locally too and it seems quite recent, some kind of regression in the month of May, possibly.
I can confirm it only happens with the quick rectangle select tool.
I have also been able to replicate the weird "grace period" behaviour, where only the first of two screenshots in quick succession gets saved to ~/Pictures.
I can also confirm that it does NOT happen if Spectacle's window is open.

It may feel a little silly, but this might warrant a bit more attention, I find people tend to use the "quick screenshot" tool for screenshots of semi-sensitive stuff that they don't expect to be saved permanently quite a lot.

Version Info:
OS: Manjaro
Qt: 5.15.4
Kernel: 5.15.41-1-MANJARO
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Using X11
Spectacle: 22.04.1
Comment 6 Antonio Prcela 2022-06-14 20:16:28 UTC
*** Bug 453127 has been marked as a duplicate of this bug. ***
Comment 7 Antonio Prcela 2022-06-14 20:21:28 UTC
Can confirm, will take a look into it.
Happens with almost all shortcuts. Exception is "print"-key only, launches spectacle and does not save a screenshot unless otherwise configured.
Comment 8 Bug Janitor Service 2022-06-16 14:13:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/139
Comment 9 fabiodanielreis 2022-06-17 18:05:22 UTC
Hi! Just would like to add a few more details that may be helpful. I use custom keyboard for screenshots that launch `spectacle` command in background mode, e.g. `spectacle -b -c -m`.  The `-m` captures current monitor, `-b` runs in background mode (no GUI), and `-c` copies the screenshot to clipboard. As reported in this bug, running the commands copies the screenshot to clipboard but also saves the file in the default directory.

I looked into the Merge Request, and I noticed it only does a tweak in a switch case for when the app runs in DBUS mode, which is not my case. So I guess it wouldn't fix the issue completely? I am not familiar with the code base, but maybe the bug is elsewhere? Because for background mode, `mSaveToOutput` starts as true, but if the option for copying to clipboard is enabled, it sets that flag to false. That part seems correct, I think. So either the flag is changed after, or it not used correctly, or something else. But these are just my two cents, I didn't any experiments locally.
Comment 10 Antonio Prcela 2022-06-27 09:47:26 UTC
Git commit 9360183588739611f291f57421e764d2291fc530 by Antonio Prcela.
Committed on 26/06/2022 at 15:05.
Pushed by felixernst into branch 'master'.

Respect settings in DBUS mode

Respect user set settings to either automatically save an image or not.
If within 'after taking a screenshot' the setting 'save file to default folder'
is unset and 'do not copy anything' is set, spectacle will only copy the
screenshot into clipboard.

M  +2    -0    src/SpectacleCore.cpp

https://invent.kde.org/graphics/spectacle/commit/9360183588739611f291f57421e764d2291fc530