Bug 416707 - Virtual desktop wrap-around doesn't work for qdbus org.kde.KWin /KWin org.kde.KWin.nextDesktop
Summary: Virtual desktop wrap-around doesn't work for qdbus org.kde.KWin /KWin org.kde...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 5.17.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-24 19:38 UTC by RaitaroH
Modified: 2023-09-11 16:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RaitaroH 2020-01-24 19:38:39 UTC
SUMMARY
There are shortcuts to switch to the next/prev virtual desktop. Those are:
    qdbus org.kde.KWin /KWin org.kde.KWin.nextDesktop
    qdbus org.kde.KWin /KWin org.kde.KWin.previousDesktop
The problem is that running these in a terminal or calling them from sxhkd for example does not allow wrapping around of desktops, say 1-2-3-4-1 doesn't work and I am stuck at 1.

STEPS TO REPRODUCE
1. go to the last desktop
2. in a terminal run `qdbus org.kde.KWin /KWin org.kde.KWin.nextDesktop`
3. make sure the setting to wrap around desktops is enabled (in the Virtual Desktops settings)
4. nothing happens when command is entered. Going to desktop 1 doesn't work, going back to previous does work, unless is run on first desktop in which case it won't wrap to last.

OBSERVED RESULT
Virtual desktop wrapping doesn't work if the above qdbus commands are used. On the other hand if the shortcuts from Global Shortcuts > Kwin are used then everything is totally fine and works as expected.
On that note, invoking the shortcut with qdbus like this instead, does work:
    qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut 'Switch to Next Desktop'

EXPECTED RESULT
qdbus commands should act the same way as the global shortcuts/invoke shortcut command.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.0
Kernel Version: 5.4.13-3-MANJARO
OS Type: 64-bit
Comment 1 David Edmundson 2023-09-06 10:39:01 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.
Comment 2 RaitaroH 2023-09-11 16:19:42 UTC
I confirm the problem has been resolved. Thank you.