Created attachment 163753 [details] An error message that shows up after clicking on Spectacle notification SUMMARY After taking a screenshot using the Capture Rectangular Region shortcut key, a notification pops out which supposedly should open the screenshot in Gwenview once clicked on. However, instead of showing the image Gwenview complains about a /tmp/Spectacle.xxxxxx file not existing. STEPS TO REPRODUCE 1. Take a screenshot using the Capture Rectangular Region shortcut 2. Click on the notification from Spectacle 3. Gwenview shows an error message dialog (in attachment) OBSERVED RESULT Gwenview complains that /tmp/Spectacle.xxxxxx/Screenshot_xxxxxxx_xxxxxx.png does not exist EXPECTED RESULT Gwenview should open the screenshot normally SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.90.0 KDE Frameworks Version: 5.246.0 Qt Version: 6.6.1 Kernel Version: 6.6.3-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics Memory: 15.0 GiB of RAM Graphics Processor: AMD Radeon Graphics
Do you have Spectacle set up to copy the image to the clipboard automatically?
(In reply to Nate Graham from comment #1) > Do you have Spectacle set up to copy the image to the clipboard > automatically? Yes. In the settings, "After taking a screenshot" is set to "Copy image to clipboard". The other settings are the same as default (except shortcut key, but that shouldn't affect program behaviour).
If I make Spectacle keep a copied image for 10 seconds by keeping itself alive for 10 seconds after being closed, Gwenview will still stop showing the image the moment it is deleted. I could prevent Spectacle from automatically deleting its temporary files when closed, but that could cause lots of screenshots to pile up for users that don't reboot often. I could try making Spectacle delete its previous temp dirs at startup, but that might also slow down startup. It also might not slowdown startup if I use synchronous KIO jobs or it might only have a minimal effect on startup time. I feel like I should point out that system notification behavior isn't very customizeable. If it was possible, the low risk solution would be to make clicking the thumbnail do nothing, but right now it unconditionally opens whatever URL was used for the thumbnail instead of doing the default action.
> if I use synchronous KIO jobs *asynchronous
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/303
Git commit cadb8a03c85ff2528ddb5546f6829f7c80157d91 by Noah Davis. Committed on 07/12/2023 at 18:34. Pushed by ndavis into branch 'master'. Keep temp files until a new temp dir is created M +10 -0 src/ExportManager.cpp https://invent.kde.org/graphics/spectacle/-/commit/cadb8a03c85ff2528ddb5546f6829f7c80157d91