Bug 424781 - In background/dbus mode with "Copy image to clipboard" setting checked, it copies the image path to your clipboard rather than the image itself
Summary: In background/dbus mode with "Copy image to clipboard" setting checked, it co...
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-29 07:27 UTC by leocdean
Modified: 2020-11-22 16:51 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description leocdean 2020-07-29 07:27:07 UTC
SUMMARY
When you copy something in Spectacle, it copies the image directory to your clipboard, and not the image.

STEPS TO REPRODUCE
1. Use Arch Linux
2. Have Spectacle running in the background.
3. Have Spectacle copy an image to your clipboard, and paste it somewhere that allows images.

OBSERVED RESULT
You'll see that it pastes the directory of the image, and not the image itself.

EXPECTED RESULT
It is supposed to paste the image itself.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.7.10-arch1-1 and 5.19.4
(available in About System)
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
Comment 1 Antonio Prcela 2020-07-29 19:20:17 UTC
Hi, I think that I just saw your thread on reddit :)

Can you tell me what your configuration looks like?
Configure -> General -> What is set within "After taking screenshot" ?
Configure -> Save -> Do you have the "Copy file location to clipboard after saving" set?

greets
Comment 2 Bernie Innocenti 2020-07-30 10:29:57 UTC
I'm not the original reporter, but I have the same issue:

> Configure -> General -> What is set within "After taking screenshot" ?
Copy image to clipboard: checked
Autosave the image to the default location: unchecked

> Configure -> Save -> Do you have the "Copy file location to clipboard after saving" set?
Yes, it's checked (it's the default setting).

With these settings:
1. I take a screenshot with the hotkey
2. I paste the clipboard in the desktop or in Dolphin
3. The file appears, but it contains the pathname

This other workflow used to be broken, but now it works with plasma built from git:
1. I take a screenshot with the hotkey
2. Open hamburger menu in the notification
3. Select "Copy" from the menu
4. Paste on the desktop or in Dolphin using ctrl-v or "Paste One File" in the context menu
Comment 3 Nate Graham 2020-07-30 13:37:11 UTC
Can reproduce with background/dbus modes.

e.g. Meta+Shift+PrintScreen to take a rectangular region screenshot with "Copy image to clipboard" checked in settings. The clipboard is populated with the path to the image, rather than the image itself.
Comment 4 Antonio Prcela 2020-11-22 16:51:46 UTC
Fixed with:
https://invent.kde.org/graphics/spectacle/-/merge_requests/2