Bug 511509

Summary: regression: unable to paste images from clipboard
Product: [Plasma] kwin Reporter: madness742
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: contact, dmatteo002, dolphin-bugs-null, kdedev, meven, nate, shiguangda, xaver.hugl
Priority: NOR Keywords: regression
Version First Reported In: 6.5.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.5.4
Sentry Crash Report:

Description madness742 2025-11-02 11:33:14 UTC
SUMMARY
Since upgrading to Plasma 6.5.1, I've been unable to paste images from clipboard in Dolphin. 

STEPS TO REPRODUCE
1. Open Spectacle (PrtScr) and copy screenshot to clipboard.
2. Open Dolphin.
3. Right click and select "Paste clipboard contents.."
4. Press "OK".

OBSERVED RESULT
No image gets pasted after pressing "OK".

EXPECTED RESULT
The image from the clipboard should get pasted.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 43
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.17.4

ADDITIONAL INFORMATION
- `wl-paste >> image.png` from the terminal works.
- Pasting the image in other applications also works.
- This bug can be reproduced in a freshly installed Fedora 43 KDE VM (Plasma 6.4.5) after updating all the packages (Plasma 6.5.1).
- Pasting images from Firefox/Librewolf (flatpak) does not work, but pasting images from Chromium (RPM) does work. Not sure if this one is a regression.
Comment 1 madness742 2025-11-03 05:23:18 UTC
Dragging the images from clipboard popup (Meta+V) and clipboard (System Tray) into Dolphin works fine.
Comment 2 dmatteo002 2025-11-19 16:54:07 UTC
Can reproduce
Comment 3 sgd 2025-11-21 00:58:02 UTC
Before updating to KDE 6.5, I could clip images and then paste them into Dolphin as files—a useful feature. This feature no longer works after the upgrade.

`wl-paste >> image.png` from the terminal works. It can be written using shell commands.

Dragging and dropping images from the taskbar clipboard manager to Dolphin successfully writes them to PNG files.

This feature is very useful and important. Could you please fix it?
Comment 4 contact 2025-11-24 02:39:36 UTC
I'm also experiencing this, but not only with spectacle. In general, I can't paste any picture from other programs to Dolphin, even I can't drag and drop any picture from Firefox to Dolphin.

I also discussed this at discuss.kde.org: https://discuss.kde.org/t/i-cant-paste-any-image-from-other-programs-to-dolphin/41896
Comment 5 contact 2025-11-24 02:40:59 UTC
(In reply to contact from comment #4)
> I'm also experiencing this, but not only with spectacle. In general, I can't
> paste any picture from other programs to Dolphin, even I can't drag and drop
> any picture from Firefox to Dolphin.
> 
> I also discussed this at discuss.kde.org:
> https://discuss.kde.org/t/i-cant-paste-any-image-from-other-programs-to-
> dolphin/41896

I forgot to mention that I have installed Firefox from RPM.
Comment 6 Méven 2025-11-24 08:59:04 UTC
The issue might be in KDE Frameworks kio.
But Kwin had some clipboard changes recently so I suspect the regression might be there.
It needs some debugging.
Comment 7 Zamundaaa 2025-11-24 14:12:48 UTC
Can confirm, but pasting the same image into Neochat and Discord works fine.
Comment 8 contact 2025-11-25 02:27:26 UTC
In my experience, only pasting pictures in Dolphin and the desktop fails without any output to journalctl, but pasting the same picture to other programs works just fine
Comment 9 Bug Janitor Service 2025-11-26 18:00:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8488
Comment 10 Vlad Zahorodnii 2025-11-27 09:30:10 UTC
Git commit 0c91adf1a27f389ea790c0a8ca671e139755a4b5 by Vlad Zahorodnii.
Committed on 27/11/2025 at 09:09.
Pushed by vladz into branch 'master'.

wayland: Don't withdraw data offers when keyboard focus changes

When a dialog is closed, the keyboard focus doesn't move to the parent
window immediately. Instead, it jumps to the null window, and then from
the null window to the parent window.

The window activation bits need more massaging. In meanwhile, keep the
old data offers around. Not great, but it restores the old behavior.

M  +2    -0    autotests/integration/selection_test.cpp
M  +10   -5    src/wayland/seat.cpp

https://invent.kde.org/plasma/kwin/-/commit/0c91adf1a27f389ea790c0a8ca671e139755a4b5
Comment 11 Vlad Zahorodnii 2025-11-27 10:12:39 UTC
Git commit 7a15f3d6c97fbc7dde29d49c06ee710879bb9d09 by Vlad Zahorodnii.
Committed on 27/11/2025 at 09:43.
Pushed by vladz into branch 'Plasma/6.5'.

wayland: Don't withdraw data offers when keyboard focus changes

When a dialog is closed, the keyboard focus doesn't move to the parent
window immediately. Instead, it jumps to the null window, and then from
the null window to the parent window.

The window activation bits need more massaging. In meanwhile, keep the
old data offers around. Not great, but it restores the old behavior.
(cherry picked from commit 0c91adf1a27f389ea790c0a8ca671e139755a4b5)

M  +10   -5    src/wayland/seat.cpp

https://invent.kde.org/plasma/kwin/-/commit/7a15f3d6c97fbc7dde29d49c06ee710879bb9d09