Skip to content
Commit b12fb715 authored by Felix Ernst's avatar Felix Ernst 🇺🇦 Committed by Felix Ernst
Browse files

KFilePlacesView: Improve keyboard context menu triggering

1. This commit makes it so when a context menu is invoked by
keyboard the context menu will be opened for the index with
keyboard focus instead of opening the context menu at the position
of the event. This is preferable because identifying the correct
position requires more knowledge about the internals of the view,
can therefore not be easily determined from the outside, and is
furthermore more prone to positioning errors.

This fixes that the wrong context menu would appear when invoking
it through
https://commits.kde.org/kxmlgui/feb5d78b8a81a52caaa177c94adc047d80299dd2.

2. There was no way to open e.g. "Show All Entries" by keyboard
alone because the context menu would always open for an index even
when no index was selected. This is fixed by opening a context menu
for the view background when no item is selected e.g. after
unselecting using Ctrl+Space.

3. Prior to this commit, the current index would always reset when
a context menu was closed. This is however bothersome, unexpected,
and confusing when working with the places panel using a keyboard.
This commit skips the resetting of the current index if the context
menu was opened by keyboard.
parent 01326eca
Pipeline #567015 passed with stage
in 13 minutes and 2 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment