Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop wrapping not working on KDE Plasma 5 #502

Closed
RaitaroH opened this issue Jun 13, 2021 · 4 comments
Closed

Desktop wrapping not working on KDE Plasma 5 #502

RaitaroH opened this issue Jun 13, 2021 · 4 comments
Milestone

Comments

@RaitaroH
Copy link

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
@JoseExposito
Copy link
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>

@brooksvb
Copy link

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>

@JoseExposito
Copy link
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.

@brooksvb
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants