Bug 485295

Summary: Move back and forward between folders using mouse buttons
Product: [Applications] dolphin Reporter: zwpp <zwpp>
Component: panels: foldersAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: brandowlucas, gameingultra42, kfm-devel, meven29
Priority: NOR    
Version: 24.02.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 24.12
Sentry Crash Report:

Description zwpp 2024-04-09 20:28:36 UTC
I noticed a delay when I move back and forward between folders using the mouse buttons (4-5), this delay is equal to double-clicking the left mouse button on a folder to open it. I can also reduce this delay in "Settings > General Behavior > Double-click interval" but then I can't open the folder by double-clicking. I would like to know if there is a way to remove the double click delay for additional mouse buttons?

I would like to move between directories as quickly as I press a button

File Manager: Dolphin
Arch Linux
Kernel: 6.8.4-arch1-1 (64-bit)
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Graphics Platform: Wayland
Comment 1 Bug Janitor Service 2024-07-31 09:01:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/807
Comment 2 Méven 2024-07-31 12:04:50 UTC
Git commit 131c889b0c050592809035242db6200482e0edde by Méven Car.
Committed on 31/07/2024 at 12:04.
Pushed by meven into branch 'master'.

Kitemlistcontroller: only accept doubleclick for left mouse button

Add test for double-click activation.

M  +1    -1    src/kitemviews/kitemlistcontroller.cpp
M  +58   -0    src/tests/kitemlistcontrollertest.cpp

https://invent.kde.org/system/dolphin/-/commit/131c889b0c050592809035242db6200482e0edde
Comment 3 gameingultra42 2024-07-31 16:06:27 UTC
commit 131c889b does not actually fix this issue. I just built it, and the double click delay still applies to the back and forward buttons, and double clicking the back or forward buttons when the mouse cursor does not have a file or directory behind it selects all items in the current directory.

Operating System: CachyOS Linux 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.9.9-1-cachyos-echo-lto (64-bit)
Graphics Platform: Wayland
Comment 4 Bug Janitor Service 2024-08-13 09:08:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/810
Comment 5 Méven Car 2024-08-13 09:20:12 UTC
(In reply to gameingultra42 from comment #3)
> commit 131c889b does not actually fix this issue. I just built it, and the
> double click delay still applies to the back and forward buttons, and double
> clicking the back or forward buttons when the mouse cursor does not have a
> file or directory behind it selects all items in the current directory.
> 
I was focusing on other issue I noticed the bug title sort-of implied.

> I noticed a delay when I move back and forward between folders using the mouse buttons (4-5), this delay is equal to double-clicking the left mouse button on a folder to open it.

I don't notice a delay like this, I set my double-click delay to 1 second, but the forward/back mouse button are unaffected, using Dolphin Version 24.05.2.
Comment 6 gameingultra42 2024-08-17 13:32:49 UTC
(In reply to Méven Car from comment #5)
> (In reply to gameingultra42 from comment #3)
> > commit 131c889b does not actually fix this issue. I just built it, and the
> > double click delay still applies to the back and forward buttons, and double
> > clicking the back or forward buttons when the mouse cursor does not have a
> > file or directory behind it selects all items in the current directory.
> > 
> I was focusing on other issue I noticed the bug title sort-of implied.
> 
> > I noticed a delay when I move back and forward between folders using the mouse buttons (4-5), this delay is equal to double-clicking the left mouse button on a folder to open it.
> 
> I don't notice a delay like this, I set my double-click delay to 1 second,
> but the forward/back mouse button are unaffected, using Dolphin Version
> 24.05.2.

About the delay : for some reason, setting the double click delay over 400ms does not increase the back/forward delay. However, lowering it under 400ms, also lowers the back/forward delay.
Comment 7 Méven Car 2024-08-25 12:50:24 UTC
(In reply to gameingultra42 from comment #6)
> (In reply to Méven Car from comment #5)
> > (In reply to gameingultra42 from comment #3)
> > > commit 131c889b does not actually fix this issue. I just built it, and the
> > > double click delay still applies to the back and forward buttons, and double
> > > clicking the back or forward buttons when the mouse cursor does not have a
> > > file or directory behind it selects all items in the current directory.
> > > 
> > I was focusing on other issue I noticed the bug title sort-of implied.
> > 
> > > I noticed a delay when I move back and forward between folders using the mouse buttons (4-5), this delay is equal to double-clicking the left mouse button on a folder to open it.
> > 
> > I don't notice a delay like this, I set my double-click delay to 1 second,
> > but the forward/back mouse button are unaffected, using Dolphin Version
> > 24.05.2.
> 
> About the delay : for some reason, setting the double click delay over 400ms
> does not increase the back/forward delay. However, lowering it under 400ms,
> also lowers the back/forward delay.

I doubt the specific buttons have something to do with this, at least I can't reproduce.
I wonder if all your folders are affected, or if this is just specify drives or network folders that are concerned.
Comment 8 Méven 2024-10-17 14:08:07 UTC
Git commit 819960aed450d9aa40fd42dc42ad7119c88a4802 by Méven Car, on behalf of Wolfgang Müller.
Committed on 17/10/2024 at 14:07.
Pushed by meven into branch 'master'.

kitemlistcontroller: process forward/back buttons when double-clicking

Tapping the forward or back mouse buttons quickly enough makes Dolphin
interpret the action as a double-click of the button in question and
handle it in mouseDoubleClickEvent() instead of its normal button
handler. This means that certain button presses might seem delayed or
"swallowed" when quickly navigating forwards or backwards through the
history.

Since a double-click of the forward or back button is currently
meaningless, fix this by emitting a normal mouseButtonPressed event for
those buttons in the double-click handler and skipping any further event
processing.

Co-authored-by: Felix Ernst <felixernst@zohomail.eu>

M  +9    -0    src/kitemviews/kitemlistcontroller.cpp

https://invent.kde.org/system/dolphin/-/commit/819960aed450d9aa40fd42dc42ad7119c88a4802
Comment 9 Rico M. 2024-10-17 16:00:23 UTC
*** Bug 491507 has been marked as a duplicate of this bug. ***
Comment 10 Brandow 2024-11-03 10:00:14 UTC
(In reply to Méven from comment #8)
> Git commit 819960aed450d9aa40fd42dc42ad7119c88a4802 by Méven Car, on behalf
> of Wolfgang Müller.
> Committed on 17/10/2024 at 14:07.
> Pushed by meven into branch 'master'.
> 
> kitemlistcontroller: process forward/back buttons when double-clicking
> 
> Tapping the forward or back mouse buttons quickly enough makes Dolphin
> interpret the action as a double-click of the button in question and
> handle it in mouseDoubleClickEvent() instead of its normal button
> handler. This means that certain button presses might seem delayed or
> "swallowed" when quickly navigating forwards or backwards through the
> history.
> 
> Since a double-click of the forward or back button is currently
> meaningless, fix this by emitting a normal mouseButtonPressed event for
> those buttons in the double-click handler and skipping any further event
> processing.
> 
> Co-authored-by: Felix Ernst <felixernst@zohomail.eu>
> 
> M  +9    -0    src/kitemviews/kitemlistcontroller.cpp
> 
> https://invent.kde.org/system/dolphin/-/commit/
> 819960aed450d9aa40fd42dc42ad7119c88a4802

Using master branch git version (dolphin 24.11.70) and I can confirm the bug has now been fixed.
Comment 11 Méven Car 2024-11-05 11:59:42 UTC
Might cherry-pick to 24.08