Bug 451747 - [Wayland] Search using clipboard content doesn't work
Summary: [Wayland] Search using clipboard content doesn't work
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2022-03-20 22:42 UTC by Ismael Asensio
Modified: 2023-05-07 14:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ismael Asensio 2022-03-20 22:42:47 UTC
SUMMARY

The shortcut to run a search on clipboard content (default is Alt+Shift+F2) does not work on wayland.

KRunner is invoked, but the search text does not use the clipboard content as expected, but the most recent search in history. This is specially useful when also using "selection" in the clipboard, so that selecting some text and pressing the shortcut would launch a search using that selection.

STEPS TO REPRODUCE
1. Copy some text to the clipboard
2. Launch the KRunner's "Execute clipboard content" shortcut [default Alt+Shift+F2]

OBSERVED RESULT
- KRunner shows the previous search text in history, same as when using the regular shortcut

EXPECTED RESULT
- KRunner uses the clipboard text as the search text

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.80 (git master)
KDE Frameworks Version: 5.93.0 (git master)
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 1 Nate Graham 2022-03-27 02:29:31 UTC
Confirmed.
Comment 2 Bug Janitor Service 2023-05-06 13:34:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2902
Comment 3 Ismael Asensio 2023-05-07 13:48:48 UTC
Git commit 8a247dd620a85b4d7f2cf8d6fed4f4e43fe24718 by Ismael Asensio.
Committed on 07/05/2023 at 13:32.
Pushed by iasensio into branch 'master'.

krunner: Fix query with clipboard contents on Wayland

On Wayland we cannot retrieve the clipboard contents unless we get the focus,
so let's just delay the request until we get it.
FIXED-IN: 6

M  +12   -2    krunner/view.cpp
M  +1    -0    krunner/view.h

https://invent.kde.org/plasma/plasma-workspace/commit/8a247dd620a85b4d7f2cf8d6fed4f4e43fe24718
Comment 4 Ismael Asensio 2023-05-07 14:24:29 UTC
Git commit c1465ef57452d0f3878b757bd2a628f0de48fb36 by Ismael Asensio.
Committed on 07/05/2023 at 14:24.
Pushed by iasensio into branch 'Plasma/5.27'.

krunner: Fix query with clipboard contents on Wayland

On Wayland we cannot retrieve the clipboard contents unless we get the focus,
so let's just delay the request until we get it.
FIXED-IN: 6

(cherry picked from commit 8a247dd620a85b4d7f2cf8d6fed4f4e43fe24718)

M  +12   -2    krunner/view.cpp
M  +1    -0    krunner/view.h

https://invent.kde.org/plasma/plasma-workspace/commit/c1465ef57452d0f3878b757bd2a628f0de48fb36