SUMMARY If "Clipboard" is disabled in System Tray, Spectacle cannot keep its content in the clipboard after the notification popup disappears. STEPS TO REPRODUCE 1. Disable "Clipboard" under "Configure System Tray" -> "Entries" 2. Run spectacle -bmc 3. Wait for the notification popup to disappear 4. Try to paste OBSERVED RESULT Cannot paste anything. EXPECTED RESULT It should be able to paste the screenshot. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.26.0 KDE Frameworks Version: 5.99.0 Qt Version: 5.15.6 Kernel Version: 6.0.1-zen1-1-zen (64-bit) Graphics Platform: Wayland
When you disable the clipboard manager, the system isn't capable of storing clipboard data after the app that provided it quits; that's one of the features that it provides. Once the notification disappears, Spectacle quits. I would recommend that you avoid disabling the clipboard service if you want to use the features that it provides! :)
Some applications (like wl-copy) keep themselves running until they lose grip on the clipboard. Is it desirable for Spectacle to do the same?
Can you outline what would that look like for Spectacle?
(In reply to Nate Graham from comment #3) > Can you outline what would that look like for Spectacle? It would look like this: Spectacle would not quit immediately after a screenshot. Instead, it would wait while it still "owns the clipboard" (i.e. a paste action elsewhere would paste from Spectacle). It only quits once it loses ownership. To demonstrate this behavior with wl-copy: - In a terminal, run "echo 1234 | wl-copy -f" -> wl-copy waits in the foreground; at the same time, pasting shows "1234" - Copy something to the clipboard -> wl-copy quits
Do you have an idea for how it could know that? How does wl-copy do it?
In wl-copy I think it listens to the "wl_data_source::cancelled" (or similar) event to determine if it is still the clipboard owner. I did some experiments with PyQt and this can somehow be done by listening to the QClipboard::dataChanged event and checking QClipboard::ownsClipboard. However, it only seems to work if there is a window.
Yeah that won't work for Spectacle unfortunately.