Bug 451394 - In Wayland session, screenshots dragged to Slack do not generate preview
Summary: In Wayland session, screenshots dragged to Slack do not generate preview
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 21.12.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2022-03-11 13:30 UTC by Martin van Es
Modified: 2022-05-15 17:11 UTC (History)
2 users (show)

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


Attachments
Screenshot showing the failed preview in Slack (34.37 KB, image/png)
2022-03-11 13:30 UTC, Martin van Es
Details

Note You need to log in before you can comment on or make changes to this bug.
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!