Bug 451394

Summary: In Wayland session, screenshots dragged to Slack do not generate preview
Product: [Applications] Spectacle Reporter: Martin van Es <bugs>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: normal CC: kde, nate
Priority: NOR Keywords: wayland-only
Version First Reported In: 21.12.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot showing the failed preview in Slack

Description Martin van Es 2022-03-11 13:30:34 UTC
Created attachment 147439 [details]
Screenshot showing the failed preview in Slack

SUMMARY
Using a Wayland-plasma session screenshots taken in Spectacle and put on clipboard can be pasted in a Slack converstation but Slack fails to generate a preview and shows the paste as an attached file (which quite defeats the point of sharing the screenshot).
When I save the screenshot to file, open it in Gwenview and copy-paste to Slack, the preview is generated.
This also works in normal X11 session. Slack is running in XWayland, but both Spectacle and Gwenview are native Wayland applications.

STEPS TO REPRODUCE
1.  Install Slack desktop client from Slack repository (https://packagecloud.io/slacktechnologies/slack/debian/ jessie main)
2. Start Plasma Wayland session
3. Press prnt-scrn to start Spectacle and create screenshot
4. Press "Copy Image to Clipboard"
5. Press Ctrl-V in a Slack conversation

OBSERVED RESULT
The image is pasted as an attachment instead of preview, and misses the preview in the conversation.

EXPECTED RESULT
The image pasted as a previewable image inline in the conversation.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.24.3
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Comment 1 Nate Graham 2022-03-25 03:36:18 UTC
Perhaps the image file loses its mimedata on its trip through XWayland?
Comment 2 Martin van Es 2022-05-15 17:11:26 UTC
I just (re)tested and it has been fixed. Not sure where or when, but I'm running Kubuntu 22.04 with backports ppa.
Thx!