SUMMARY Spectacle won't save to clipboard when the option to do so is enabled given a handful of conditions are met. STEPS TO REPRODUCE 1. Define a custom shortcut for "Capture Rectangular Region" (in my case, Meta+Shift+S) 2. Configure Spectacle to Copy Image to the Clipboard after a screenshot is taken. 3. System Tray > Notifications applet > Configure Event Notifications and Actions... > Hit "Configure" at the right of the "Applications:" label 4. Select Spectacle from the list > Configure Events... > Untick "Show message in a popup" OBSERVED RESULT The screenshot does not get saved to the clipboard. EXPECTED RESULT The screenshot should be saved to the clipboard. SOFTWARE/OS VERSIONS Operating System: Manjaro Linux KDE Plasma Version: 5.21.1 KDE Frameworks Version: 5.79.0 Qt Version: 5.15.2 Kernel Version: 5.11.1-1-MANJARO OS Type: 64-bit Graphics Platform: X11 ADDITIONAL INFORMATION Making use of the default shortcut (Meta+Shift+Print) won't cause this problem on my end.
I can still reproduce this issue with spectacle 22.08.1. Operating System: Arch Linux KDE Plasma Version: 5.25.90 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6 Graphics Platform: Wayland
So what happens is that if notifications are disabled like that, the KNotification object in Spectacle is destroyed immediately, and my guess is that this is causing Spectacle to exit before the clipboard can be set. It doesn't seem to matter what the shortcut is, though. I wonder if just adding a short timer before emitting allDone would be enough.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/154
*** Bug 451763 has been marked as a duplicate of this bug. ***
Git commit 0a5967b069e2016ec3fe7d4610784370aad7e70f by Bharadwaj Raju. Committed on 15/10/2022 at 21:20. Pushed by bharadwaj-raju into branch 'master'. Add a small delay before exiting when notification is destroyed The destruction of the notification object happens immediately if Spectacle is blocked from showing notifications, and in such cases it exits before data can be copied to the clipboard. M +5 -3 src/SpectacleCore.cpp https://invent.kde.org/graphics/spectacle/commit/0a5967b069e2016ec3fe7d4610784370aad7e70f