Bug 455807

Summary: Present Windows enter key no longer opens a window if it's the only match for the search query when mouse is on wrong display
Product: [Plasma] kwin Reporter: Mark S <wolfendeathx>
Component: effects-present-windowsAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: minor CC: nate, notmart
Priority: NOR    
Version: 5.25.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mark S 2022-06-22 19:56:18 UTC
SUMMARY

Prior to 5.25, when searching for a window, if there was only a single window that matched a search query, the enter key could be pressed to switch to it. This still works if the mouse is on the display where the matched window is present, but not if it's on a different display.

STEPS TO REPRODUCE

1. Use multiple displays
2. Have a multiple applications open, one of which only has a single window
3. Open the Present Windows effect
4. Search for the application that only has a single window open
5. Once a single window is open, move the mouse to a display where the window is *not* present and hit the enter key
6. Move the mouse to a display where the window *is* present and hit the enter key

OBSERVED RESULT

On step 4, the matched window is *not* opened; on step 5 it is opened

EXPECTED RESULT

On step 4, the matched window *is* opened; on step 5 it is opened

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.1
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Kernel Version: 5.18.5-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Marco Martin 2022-06-23 10:51:50 UTC
in general focus on the fullscreen qml effects is not correct, looking into that
Comment 2 Bug Janitor Service 2022-06-23 12:56:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2572
Comment 3 Mark S 2022-06-23 16:13:36 UTC
In the "Observed Result" and "Expected Result" sections, it's supposed to be step 5 and 6, not step 4 and 5--typo on my part.
Comment 4 Nate Graham 2022-06-24 15:56:12 UTC
Git commit 66d127879461aed2e6c6312d52219502a6354f71 by Nate Graham, on behalf of Marco Martin.
Committed on 24/06/2022 at 15:56.
Pushed by ngraham into branch 'master'.

Internal tracking for quick effect item focus

focus used to be always forced to the root item of the view in the
"active screen" (which behavior is configurable between mouse poosition
and screen of active window)
now set focus to that particular view only if nothing is focused, also when
the user explicitly sets focus to an item in another view
remove focus to the old one so the item properly focused would be there
Related: bug 455783, bug 455633

M  +5    -0    src/libkwineffects/kwinoffscreenquickview.cpp
M  +2    -0    src/libkwineffects/kwinoffscreenquickview.h
M  +35   -4    src/libkwineffects/kwinquickeffect.cpp
M  +5    -0    src/libkwineffects/kwinquickeffect.h

https://invent.kde.org/plasma/kwin/commit/66d127879461aed2e6c6312d52219502a6354f71
Comment 5 Nate Graham 2022-06-24 15:57:17 UTC
Git commit ea5bc72dc27562b99b81f2b3ddb855468353896e by Nate Graham, on behalf of Marco Martin.
Committed on 24/06/2022 at 15:56.
Pushed by ngraham into branch 'Plasma/5.25'.

Internal tracking for quick effect item focus

focus used to be always forced to the root item of the view in the
"active screen" (which behavior is configurable between mouse poosition
and screen of active window)
now set focus to that particular view only if nothing is focused, also when
the user explicitly sets focus to an item in another view
remove focus to the old one so the item properly focused would be there
Related: bug 455783, bug 455633


(cherry picked from commit 66d127879461aed2e6c6312d52219502a6354f71)

M  +5    -0    src/libkwineffects/kwinoffscreenquickview.cpp
M  +2    -0    src/libkwineffects/kwinoffscreenquickview.h
M  +35   -4    src/libkwineffects/kwinquickeffect.cpp
M  +5    -0    src/libkwineffects/kwinquickeffect.h

https://invent.kde.org/plasma/kwin/commit/ea5bc72dc27562b99b81f2b3ddb855468353896e