Bug 511736

Summary: Spectacle does not copy to clipboard from the rectangular region UI; you have to accept and click Copy from main window UI
Product: [Applications] Spectacle Reporter: Amr Nabeel <amr.nabeel>
Component: GeneralAssignee: Noah Davis <noahadvs>
Status: RESOLVED FIXED    
Severity: normal CC: famine_cavalier538, gillulyd, kde, nate, scaine
Priority: NOR    
Version First Reported In: 6.5.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.22
Sentry Crash Report:

Description Amr Nabeel 2025-11-06 22:21:59 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY


STEPS TO REPRODUCE
1. Press print screen
2. Drag to select Screen part you're capturing
3. Select copy
4. paste

OBSERVED RESULT
1. After Spectacle opens with Notification that `The screenshot has been copied to the clipboard.`
2. Nothing happens when you try to paste the copied screenshot
3. Clipboard Contents does not show that there is a screenshot
4. You have to select copy again from inside Spectacle to actually copy the screenshot to clipboard.

EXPECTED RESULT
1. Screenshot is in the clipboard

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 9700X 8-Core Processor
Memory: 32 GiB of RAM (31.0 GiB usable)
Graphics Processor: AMD Radeon RX 9070 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X870 GAMING X WIFI7

ADDITIONAL INFORMATION
Spectacle does not copy to clipboard from the `capture` UI, you have to accept and select `Copy` from Spectacle UI
Comment 1 scaine 2025-11-13 14:01:01 UTC

*** This bug has been marked as a duplicate of bug 509065 ***
Comment 2 Nate Graham 2025-12-09 21:51:27 UTC
Not a duplicate; it's reporting something slightly different.

I can't reproduce the issue as reported with current git master.
Comment 3 Nate Graham 2025-12-10 17:18:39 UTC
*** Bug 512029 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2025-12-11 16:29:00 UTC
*** Bug 513201 has been marked as a duplicate of this bug. ***
Comment 5 David Edmundson 2025-12-15 10:21:15 UTC
Git commit b71af4e1afcf72b8c9da315dc8d728db70d753c0 by David Edmundson, on behalf of David Redondo.
Committed on 15/12/2025 at 10:16.
Pushed by davidedmundson into branch 'master'.

ksystemclipboard: Dispatch read events in another thread

WaylandClipboard wraps ext_data_control if an application tried to read
the clipboard using QClipboard whilst it owns the data control we would
deadlock.

This was previously being solved by trying to transfer mimedata to the
regular clipboard upon gaining focus. However this never worked
reliably and efforts to fix this only made it more complicated.

To solve the original deadlock all ext_data_control classes now live on
another thread which dispatches events on a separate queue. A recursive
mutex allows the main thread to read mimedata and no wayland events
which change the mimedata process until this is complete.
Related: bug 480448, bug 496029, bug 502831, bug 505281, bug 506467, bug 507792, bug 509065, bug 509689
FIXED-IN: 6.22

M  +116  -14   src/systemclipboard/waylandclipboard.cpp
M  +3    -0    src/systemclipboard/waylandclipboard_p.h

https://invent.kde.org/frameworks/kguiaddons/-/commit/b71af4e1afcf72b8c9da315dc8d728db70d753c0