Bug 455586

Summary: Windowview: No window is highlighted when more than one is visible
Product: [Plasma] kwin Reporter: Niklas Stephanblome <notify>
Component: effects-present-windowsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, notmart
Priority: NOR Keywords: regression, usability
Version: 5.25.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.25.2

Description Niklas Stephanblome 2022-06-19 06:58:25 UTC
With the new presentwindows effect, switching to different window of the same application as a keyboard user has become unnecessarily complicated:
When I search for the application and two windows are left, no window is selected by default. To open one window, I have to
a) Press enter to exit the search box
b) press any arrow key to highlight one window
c) See what window is highlighted
d) Use the arrow keys to select the desired window.

When filtering windows with the search box, one window should always be selected by default. This is currently only the case if there is only one window left. There should also be an easy way to change the selection (for example: Ctrl+Arrow key) without exiting the search box at the top.

Then you would be able to search for an application, 2 windows are left, one of which is highlighted (just like in the old presentwindows effect). You press "Ctrl+Arrow keys" (or we should expose it as a shortcut in the kde settings) to switch to the other window if desired and press "Enter".

STEPS TO REPRODUCE
1. Open two instances of "System settings"
2. Activate the effect and search for "settings".
3. Try to select either window with the keyboard

OBSERVED RESULT
You have to press an unnecessary amount of keys to select either window with the keyboard. 

EXPECTED RESULT
You see which window is highlighted. If you press "Enter", that window gets opened, just as it is now when there is only one left. You can use a keyboard shortcut to switch between the windows WITHOUT exiting the search bar at the top.


I have been using the presentwindows (now windowview) effect for a long time with the keyboard as my only way to switch windows. With this new update, my workflow is broken. :(
Comment 1 Niklas Stephanblome 2022-06-22 11:15:55 UTC
Ok, I fixed this issue now and the merge request is waiting to be accepted.
Comment 2 Niklas Stephanblome 2022-06-22 15:20:48 UTC
Marking this as assigned
Comment 3 Nate Graham 2022-06-23 17:14:11 UTC
Git commit 6838b1132fad8b32c26409fd46b2e49803684dd6 by Nate Graham, on behalf of Niklas Stephanblom.
Committed on 23/06/2022 at 17:13.
Pushed by ngraham into branch 'master'.

Windowview: Fix broken keyboard navigation while filtering

After the 5.25 update, one could not see which window was highlighted until one
manually unfocused the SearchField and then pressed any key to refresh the WindowHeap.
Also, the searchbar would (most of the time) "absorb" the arrow keys so one had to
also unfocus it to really be able to select windows with they keyboard. 

With this change, there is always one window highlighted while filtering using the
search box. Also, one can select another window with the arrow keys without manually
unfocusing the searchbox. This heavily improves the keyboard functionality in this
effect that got lost with the 5.25 update of presentwindows to windowview and
resolves complaints about the keyboard navigation being buggy. 
Related: bug 455633, bug 455764, bug 455099, bug 455753
FIXED-IN: 5.25.2

M  +6    -2    src/effects/windowview/qml/main.qml
M  +3    -0    src/effects/windowview/windowvieweffect.cpp

https://invent.kde.org/plasma/kwin/commit/6838b1132fad8b32c26409fd46b2e49803684dd6
Comment 4 Nate Graham 2022-06-23 17:16:33 UTC
Git commit dcc77bfa8fbca8032047fbbb5ab65382293488ac by Nate Graham, on behalf of Niklas Stephanblom.
Committed on 23/06/2022 at 17:16.
Pushed by ngraham into branch 'Plasma/5.25'.

Windowview: Fix broken keyboard navigation while filtering

After the 5.25 update, one could not see which window was highlighted until one
manually unfocused the SearchField and then pressed any key to refresh the WindowHeap.
Also, the searchbar would (most of the time) "absorb" the arrow keys so one had to
also unfocus it to really be able to select windows with they keyboard. 

With this change, there is always one window highlighted while filtering using the
search box. Also, one can select another window with the arrow keys without manually
unfocusing the searchbox. This heavily improves the keyboard functionality in this
effect that got lost with the 5.25 update of presentwindows to windowview and
resolves complaints about the keyboard navigation being buggy. 
Related: bug 455633, bug 455764, bug 455099, bug 455753
FIXED-IN: 5.25.2


(cherry picked from commit 6838b1132fad8b32c26409fd46b2e49803684dd6)

M  +6    -2    src/effects/windowview/qml/main.qml
M  +3    -0    src/effects/windowview/windowvieweffect.cpp

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