Bug 425787

Summary: Scrolling on the desktop makes virtual desktop navigation wrap around even when option in KCM is unchecked
Product: [Plasma] plasmashell Reporter: Phil Rigby <phil.rigby>
Component: Desktop ContainmentAssignee: Nate Graham <nate>
Status: RESOLVED FIXED    
Severity: normal CC: nate, plasma-bugs, torokati44
Priority: NOR    
Version: 5.19.4   
Target Milestone: 1.0   
Platform: Gentoo Packages   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=419867
Latest Commit: Version Fixed In: 5.22

Description Phil Rigby 2020-08-25 16:20:07 UTC
I have "Navigation Wraps Around" disabled for my virtual desktops - of which I have two - however if I mouse wheel on the desktop it will cycle through #1 then #2 then back to #1 then #2 then back to #1 ad infinitum.  As the cycling is usually because of an extremely sensitive mouse wheel it's actually quite difficult to get back to #1 so it stopping after #2 would be great, which is what I would expect to happen with "Wrap Around" turned off.

STEPS TO REPRODUCE
1. System Settings - Workspace Behaviour - Virtual Desktops
2. Options - Navigation Wraps around, unchecked 
3. Roll your mouse wheel on a blank area of desktop.  

OBSERVED RESULT
It will loop through all your virtual desktops until you/the wheel stops.

EXPECTED RESULT
To stop when reaching either the highest or lowest numbered desktop, depending on scroll direction.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
I see from some other bug reports this issue may of existed back in Plasma 4, also comments about KWin respecting the option but Plasma does not and bugs should be reported about plasmashell for this issue.  I wasn't sure if this was a System Settings issue or Plasma but given the other comments about KWin working, I went with Plasma, so sorry if i categorized this incorrectly.

Here's a link to a video with me demonstrating the issue:
https://www.dropbox.com/s/s2d8w0kowe0dhto/bug-2020-08-25_11.16.48.mkv?dl=0
Comment 1 Nate Graham 2020-08-25 22:00:07 UTC
The pager has its own "Navigation wraps around" setting. The one in the KCM applies to global keyboard shortcuts, not the pager.
Comment 2 Phil Rigby 2020-08-26 13:23:49 UTC
Ok well I didn't know that.  I just added a Pager widget, looked a the settings and "Navigation Wraps Around" was _unchecked_ there also.  I checked it, applied, unchecked, applied and same thing - it wraps around when the option is unchecked so I don't believe this bug is "resolved" unless there's another spot I'm supposed to look at...
Comment 3 Nate Graham 2020-08-26 15:20:29 UTC
Ah my mistake, I thought you were using the pager since this bug report was filed against the pager, and I didn't read closely enough. I can confirm the bug now.
Comment 4 Phil Rigby 2020-08-26 15:34:01 UTC
Thanks Nate.  As I mentioned it's one of those areas where it could be categorized under a few different things, not always obvious where best to file these things.  Glad you were able to reproduce it though :-)
Comment 5 Nate Graham 2021-03-12 00:08:33 UTC
It looks like the switchdesktops containment action does not read this setting (rollOverDesktops) at all and just always wraps. :/
Comment 6 Nate Graham 2021-03-12 00:25:28 UTC
Working on this.
Comment 7 Bug Janitor Service 2021-03-12 03:12:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/710
Comment 8 Nate Graham 2021-03-15 18:42:45 UTC
Git commit 554a4f9c48af90c1cf59bd5872b87b230b1c5e71 by Nate Graham.
Committed on 15/03/2021 at 18:33.
Pushed by ngraham into branch 'master'.

Make virtual desktop scroll action respect wrap setting

The KWin setting for whether or not to wrap around was not respected, so
wrap was always true even if the user has turned it off. This commit
fixes that.

M  +10   -2    containmentactions/switchdesktop/desktop.cpp
M  +62   -0    libtaskmanager/virtualdesktopinfo.cpp
M  +9    -0    libtaskmanager/virtualdesktopinfo.h

https://invent.kde.org/plasma/plasma-workspace/commit/554a4f9c48af90c1cf59bd5872b87b230b1c5e71