Skip to content

Desktop wrapping not working on KDE Plasma 5 #502

Closed

Description

@RaitaroH

Describe the bug

In Plasma 5 you can set "Desktop Wrapping" setting in Settings | Workspace Behavior | Virtual Desktops > Navigation wraps around. This way using keyboard commands you can go from Desktop 4 to Desktop 1 (and 1 to 4). But this doesn't work with Touchegg's CHANGE_DESKTOP action. The action works perfectly fine otherwise.

Expected behaviour

The CHANGE_DESKTOP should allow moving from last desktop to first desktop or from first to last, the same way keyboard shortcuts do, if the navigation wraps around setting is true. If it is false, then it shouldn't work.

Actual behaviour

The CHANGE_DESKTOP action does not wrap around, even with the setting being set to true. If I am at Desktop 4 and try to switch to next desktop (Desktop 1) then I get the animation but nothing actually happens. Same if I am on Desktop 1 and try to move left to Desktop 4. Using the keyboard shortcut does switch as expected. (D1 to D2, D2 to D3, D3 to D4 works flawlessly).
To get wrapping to work I will have to use RUN_COMMAND with qdbus instead, but this way the animations do not work which is not desired. I suppose a nice workaround would be to allow overwriting any default touchegg action, while keeping the animation and its properties.

    <gesture type="SWIPE" fingers="4" direction="RIGHT">
      <action type="RUN_COMMAND">
        <command>qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut 'Switch to Next Desktop'</command>
        <repeat>false</repeat>
        <decreaseCommand></decreaseCommand>
      </action>
    </gesture>
    <gesture type="SWIPE" fingers="4" direction="LEFT">
      <action type="RUN_COMMAND">
        <command>qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut 'Switch to Previous Desktop'</command>
        <repeat>false</repeat>
        <decreaseCommand></decreaseCommand>
      </action>
    </gesture>

Your environment

  • Touchégg v2.0.10
  • Operating System: Manjaro Linux
  • KDE Plasma Version: 5.21.5
  • KDE Frameworks Version: 5.82.0
  • Qt Version: 5.15.2

Activity

  1. JoseExposito commented on Jun 13, 2021

    @JoseExposito
    Owner

    Hi,

    I added an extra option to CHANGE_DESKTOP:

    <gesture type="SWIPE" fingers="4" direction="LEFT">
      <action type="CHANGE_DESKTOP">
        <cyclic>true</cyclic>
      </action>
    </gesture>
    
    <gesture type="SWIPE" fingers="4" direction="RIGHT">
      <action type="CHANGE_DESKTOP">
        <cyclic>true</cyclic>
      </action>
    </gesture>
  2. added this to the 2.0.11 milestone on Jun 13, 2021
  3. brooksvb commented on Sep 14, 2021

    @brooksvb

    Hi,

    I added an extra option to CHANGE_DESKTOP:

    <gesture type="SWIPE" fingers="4" direction="LEFT">
      <action type="CHANGE_DESKTOP">
        <cyclic>true</cyclic>
      </action>
    </gesture>
    
    <gesture type="SWIPE" fingers="4" direction="RIGHT">
      <action type="CHANGE_DESKTOP">
        <cyclic>true</cyclic>
      </action>
    </gesture>
    

    I tried adding the cyclic option and it doesn't work. It seems this feature is implemented though? I'm on version 2.0.11-1

    Snippet of my config is the following:

    <gesture type="SWIPE" fingers="3" direction="UP">
          <action type="CHANGE_DESKTOP">
            <direction>up</direction>
            <cyclic>true</cyclic>
            <animate>true</animate>
            <animationPosition>auto</animationPosition>
          </action>
        </gesture>
        <gesture type="SWIPE" fingers="3" direction="DOWN">
          <action type="CHANGE_DESKTOP">
            <direction>down</direction>
            <cyclic>true</cyclic>
            <animate>true</animate>
            <animationPosition>auto</animationPosition>
          </action>
        </gesture>
        <gesture type="SWIPE" fingers="3" direction="LEFT">
          <action type="CHANGE_DESKTOP">
            <direction>left</direction>
            <cyclic>true</cyclic>
            <animate>true</animate>
            <animationPosition>auto</animationPosition>
          </action>
        </gesture>
        <gesture type="SWIPE" fingers="3" direction="RIGHT">
          <action type="CHANGE_DESKTOP">
            <direction>right</direction>
            <cyclic>true</cyclic>
            <animate>true</animate>
            <animationPosition>auto</animationPosition>
         </action>
        </gesture>
    
  4. JoseExposito commented on Sep 15, 2021

    @JoseExposito
    Owner

    @brooksvb could be similar to #504? If it is a different issue, please open a new bug report and I'll try to help you.

  5. brooksvb commented on Sep 15, 2021

    @brooksvb

    @brooksvb could be similar to #504? If it is a different issue, please open a new bug report and I'll try to help you.

    That's my own issue! I never noticed your prompt response after I posted that issue for some reason. I only recently came back and found this related issue and the new cyclic feature. I tried adding the cyclic option and I am still where i was in #504! We can move discussion over there.

  6. added a commit that references this issue on Feb 2, 2026
    fc1cba6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions