Skip to content

Improvements to forward/back mouse button handling in file widgets

Sean Baggaley requested to merge drinkybird/kio:mouse-back-forward into master

This commit modifies KDirOperator so that:

  • moves the handling of forward and backward buttons to MouseButtonPress, bringing behaviour in line with Dolphin, and stopping the ability to drag items using these buttons (mentioned bug #443169)
  • also makes that case handle MouseButtonDblClick, so the buttons can be pressed in quick succession without being swallowed
  • makes that handler discard the event, preventing single-clicks from selecting items on the new page, and double-clicks from opening files or folders under the mouse

There is still an edge case with dragging, in that it is still possible to drag an item with the forward/back buttons if there is no more history and the user selected the item via left-clicking first. I wasn't able to figure this out without an ugly hack (checking for the buttons in KDirModel::flags and disabling dragging). In my opinion though, that's much more of an edge case, and this commit should still be an improvement.

Edited by Sean Baggaley

Merge request reports

Loading