Bug 445751

Summary: Wayland: Clipboard not available in the effect
Product: [Plasma] kwin Reporter: Nate Graham <nate>
Component: effects-overviewAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, dev.bacteriostat, eamonnrea, kdedev, kinofhek, kmcwilliampublic, notify, zeskotron
Priority: NOR Flags: vlad.zahorodnii: Wayland+
vlad.zahorodnii: X11-
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=442521
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:

Description Nate Graham 2021-11-19 14:42:41 UTC
STEPS TO REPRODUCE
1. Copy the text "442830" to the clipboard
2. Activate the Overview effect
3. Type "bug " and then Ctrl+V to paste the text


OBSERVED RESULT
Nothing is pasted


EXPECTED RESULT
The text is pasted, causing the search field to show "bug 442830", which would display a KRunner entry to open that bug report in my web browser
Comment 1 popov895 2022-04-13 16:59:18 UTC
Not sure, but it seems that bug 442521 is related or a duplicate.
Comment 2 Nate Graham 2022-04-13 19:47:59 UTC
They're different. This is 100% reproducible always, while Bug 442521 is only sometimes reproducible under certain circumstances. If fixing Bug 442521 won't fix the issue specific to the Overview effect,
Comment 3 Felipe Kinoshita 2022-05-22 04:38:45 UTC
Cannot reproduce
Comment 4 Nate Graham 2022-05-23 15:12:51 UTC
Huh, still broken for me with current git master on Wayland. Maybe you're using X11? It only seems to happen on Wayland.
Comment 5 Bacteria 2022-05-25 08:14:49 UTC
Can reproduce on Wayland. 

Operating System: Arch Linux
KDE Plasma Version: 5.24.90
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Graphics Platform: Wayland
Comment 6 Patrick Silva 2022-10-29 18:20:12 UTC
Can reproduce on Wayland session of neon unstable.
Comment 7 Bug Janitor Service 2022-11-25 10:31:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3242
Comment 8 Zesko 2023-03-04 11:03:36 UTC
https://github.com/bugaevc/wl-clipboard/issues/149#issuecomment-1454687844

The developer of wl-clipboard claims that Kwin Wayland does not work with wl-clipboard together.

Is that possible if Kwin Wayland fixes the compatibility issue with wl-clipboard which supports different text editors e.g. Micro and Vim?
Comment 9 Nate Graham 2023-03-06 16:14:25 UTC
wl-copy works at least.
Comment 10 Zesko 2023-03-06 17:03:43 UTC
(In reply to Nate Graham from comment #9)
> wl-copy works at least.

There are two issues:

1. issue: 
 "wl-copy --clear" does not work to clear the clipboard

2. issue:
Erase the entire clipboard in KDE Klipper, then run  "wl-paste" in Konsole, but it hangs waiting to copy  a new clipboard.


KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt version: 5.15.8
Wayland
Arch Linux or any Arch based Distros
Comment 11 Bug Janitor Service 2023-03-21 03:45:39 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2023-04-05 03:45:38 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 13 Patrick Silva 2023-12-02 20:33:20 UTC
Can reproduce on Plasma 6 beta.

Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Graphics Platform: Wayland
Comment 14 Nate Graham 2023-12-04 21:44:14 UTC
Indeed, can still reproduce. Which makes sense as https://invent.kde.org/plasma/kwin/-/merge_requests/3242 which was supposed to fix this never seems to have gotten merged.
Comment 15 fanzhuyifan 2024-03-11 04:20:14 UTC
*** Bug 483179 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2024-03-11 19:35:53 UTC
*** Bug 483279 has been marked as a duplicate of this bug. ***
Comment 17 Vlad Zahorodnii 2024-08-13 14:04:32 UTC
Git commit 95a8163c5b5970243ca9d13244026e98bb1b32e1 by Vlad Zahorodnii.
Committed on 13/08/2024 at 13:53.
Pushed by vladz into branch 'master'.

qpa: Implement clipboard

This allows copy pasting text between the overview and regular clients.

QMimeData::data() has a synchronous API. It is a problem for us, the
compositor, because it means we need to block the main thread to read
the mime data. This change adds a one second timeout. If no data arrives
within the next 1 second, the qpa will give up in order to avoid freezing
the screen further. Not sure how this can be handled better without
changing the API of the QMimeData to add async overloads.

M  +1    -0    src/plugins/qpa/CMakeLists.txt
A  +207  -0    src/plugins/qpa/clipboard.cpp     [License: GPL(v2.0+)]
A  +69   -0    src/plugins/qpa/clipboard.h     [License: GPL(v2.0+)]
M  +9    -0    src/plugins/qpa/integration.cpp
M  +3    -0    src/plugins/qpa/integration.h
M  +1    -1    src/wayland/display.h

https://invent.kde.org/plasma/kwin/-/commit/95a8163c5b5970243ca9d13244026e98bb1b32e1