touchegg icon indicating copy to clipboard operation
touchegg copied to clipboard

Swipe switching desktops does not wrap to other side of grid properly

Open brooksvb opened this issue 3 years ago • 2 comments

Describe the bug

Swipe gestures for directionally switching desktops in a grid does not properly wrap to the other side when going off the edge of the grid.

Expected behaviour

It should switch to the desktop on the other side of the grid, wrapping around as I have configured in my virtual desktop settings. It works as expected when using keyboard shortcuts for directionally switching desktops.

Actual behaviour

When using SWITCH_DESKTOP with directions left, right, up, down for swipe gestures, trying to go off of the grid makes the screen flash black but does not switch desktops. (The screen flashing black seems to be another bug, which happens on every desktop switch regardless, but not with key shortcuts)

Your environment

  • Version of Touchégg: Touchégg v2.0.10
  • Operating System: Manjaro
  • Desktop Environment: KDE

brooksvb avatar Jun 14 '21 21:06 brooksvb

Update: Now on version 2.0.11-1. I added the cyclic option to my config, but wrapping to the other side still does not work. However, I do notice that if I try to switch "into the edge" of the grid, I see the little circle with an arrow in it on that edge of the screen for a moment.

After any changes to the config, I restarted the touchegg service. I also completely restarted my machine just to make sure that wouldn't enable the new cyclic option.

Snippet of my config:

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

brooksvb avatar Sep 15 '21 16:09 brooksvb

There is a workaround by invoking shortcuts:

<gesture type="SWIPE" fingers="3" direction="UP">
  <action type="RUN_COMMAND">
    <animate>true</animate>
    <animation>CHANGE_DESKTOP_UP</animation>
    <command>qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "Switch One Desktop Up"</command>
    <on>end</on>
  </action>
</gesture>

<gesture type="SWIPE" fingers="3" direction="DOWN">
  <action type="RUN_COMMAND">
    <animate>true</animate>
    <animation>CHANGE_DESKTOP_DOWN</animation>
    <command>qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "Switch One Desktop Down"</command>
    <on>end</on>
  </action>
</gesture>

<gesture type="SWIPE" fingers="3" direction="LEFT">
  <action type="RUN_COMMAND">
    <animate>true</animate>
    <animation>CHANGE_DESKTOP_LEFT</animation>
    <command>qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "Switch One Desktop to the Left"</command>
    <on>end</on>
  </action>
</gesture>

<gesture type="SWIPE" fingers="3" direction="RIGHT">
  <action type="RUN_COMMAND">
    <animate>true</animate>
    <animation>CHANGE_DESKTOP_RIGHT</animation>
    <command>qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "Switch One Desktop to the Right"</command>
    <on>end</on>
  </action>
</gesture>

NanzeRT avatar Jun 27 '22 20:06 NanzeRT