Bug 468247 - When the clipboard is empty, copying anything after copying screenshot from spectacle clears the clipboard
Summary: When the clipboard is empty, copying anything after copying screenshot from s...
Status: RESOLVED DUPLICATE of bug 457098
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 6.1.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-07 14:32 UTC by Bacteria
Modified: 2024-08-20 21:30 UTC (History)
2 users (show)

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


Attachments
Clipboard getting cleared when clicking on "Copy to Clipboard" button twice (768.10 KB, video/x-matroska)
2023-04-07 14:36 UTC, Bacteria
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bacteria 2023-04-07 14:32:24 UTC
SUMMARY
When the clipboard is empty, copying 2 screenshots one after other using spectacle clears the clipboard. 

One thing to note here is that the behavior is not reproducible when using Spectacle's notification to copy, it only happens from the spectacle window that has "Copy to Clipboard" button.

Not sure if this should go to Spectacle or Clipboard, feel free to put it in the right place.


STEPS TO REPRODUCE
1. Clear the clipboard
2. Launch spectacle and take a screenshot
3. After the screenshot is taken, click on "Copy to Clipboard" button.
4. Uncheck "Quit after manual Save or Copy" if it is checked
5. Again copy the screenshot using "Copy to Clipboard" button

OBSERVED RESULT
Clipboard loses both the screenshots

EXPECTED RESULT
Clipboard should not be cleared

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Bacteria 2023-04-07 14:36:36 UTC
Created attachment 157926 [details]
Clipboard getting cleared when clicking on "Copy to Clipboard" button twice
Comment 2 Nate Graham 2023-04-10 17:44:05 UTC
Can reproduce. Seems like a Clipboard widget bug. When the history only has that one item in it for the copied image, repeatedly clicking "Copy to clipboard" in Spectacle makes the item disappear and appear again in the history! Weird.
Comment 3 Bacteria 2023-04-13 03:18:55 UTC
Found another way to reproduce:

1. Clear the clipboard
2. Launch spectacle and take a screenshot
3. After the screenshot is taken, click on "Copy to Clipboard" button.
4. Copy anything (tested with text, file)

Observation:
Clipboard is cleared
Comment 4 Bacteria 2024-08-19 05:12:58 UTC
So today I was exploring the clipboard settings and enabled "Always save in history" for "Non-text selection" option. The image disappearing and appearing in the clipboard is fixed.
Comment 5 Bacteria 2024-08-19 05:36:54 UTC
Actually, I was previously using the setting "Never save in history" for "Non-text selection", as that was the default. So klipper should really ignore the image under this setting? I think this issue can be merged with Bug 457098.
Comment 6 Nate Graham 2024-08-20 21:30:57 UTC
Yup, looks like it.

*** This bug has been marked as a duplicate of bug 457098 ***