Bug 509277

Summary: wl-clipboard spawns a window when focus stealing prevention is set to medium
Product: [Plasma] kwin Reporter: renner0
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: accounts, ngompa, xaver.hugl
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: KDE Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: wl-copy spawns window

Description renner0 2025-09-08 15:50:48 UTC
Created attachment 184808 [details]
wl-copy spawns window

SUMMARY
If you copy/paste with wl-clipboard, wl-copy/wl-paste a window gets spawned

STEPS TO REPRODUCE
1. systemsettings > window behavior > focus stealing prevention > set to medium, apply
2. echo test | wl-copy

OBSERVED RESULT
An invisible window called wl-clipboard gets spawned and nothing gets copied/pasted from/to the clipboard.
If you click on the blank window icon in the panel, the clipboard action will be executed and the window is closed.

EXPECTED RESULT
the content gets copied/pasted into the system clipboard immediately without user interaction

ADDITIONAL INFORMATION
rolling back KWin on my heavily customized Fedora Kinoite image to
fd75e3aba30918191f9e885664ba52999868c0c5 and restarting kwin fixes it, this is the last working version I tested

first broken commit that I tested:
4a1f9bb5621d5bbcca71da0b4d23f1877e3d38db

wl-clipboard 2.2.1

I reproduced the issue on a rather fresh KDE Linux VM and also on my custom kinoite image
updatectl says this kde linux version:
202509060254
Comment 1 Zamundaaa 2025-09-09 09:51:58 UTC
Please report that to wl-copy. It should not do such terrible hacks...
Comment 3 Zamundaaa 2025-11-08 21:05:19 UTC
*** Bug 511840 has been marked as a duplicate of this bug. ***
Comment 4 Neal Gompa 2025-11-09 06:29:59 UTC
This is fixed with wl-clipboard with this commit: https://github.com/bugaevc/wl-clipboard/commit/091d6028b5c9db75ad36f9fceb0db3ee718045fa