mzur / gnome-shell-wsmatrix

GNOME shell extension to arrange workspaces in a two-dimensional grid with workspace thumbnails
GNU General Public License v3.0
468 stars 60 forks source link

[gnome 40] Slide workspace using gestures plays animation twice. #185

Open MonsieurLanza opened 3 years ago

MonsieurLanza commented 3 years ago

I just got my hands on a new laptop, which can handle gestures… You can slide workspaces with 3 fingers, left or right (yeah, there’s already an issue with the gesture itself here, in case of vertical sliding).

What happens is that when I slide a workspace (always horizontally, as I said), it re-plays the animation afterward, which is a somewhat awkward.

(may include video later on, if gnome-shell and my schedule let me record it)

mzur commented 3 years ago

Can someone with a device supporting gestures please confirm this?

@MonsieurLanza Is the animation correct if this extension is disabled?

KristianOde commented 3 years ago

This happens to me as well, on Fedora 34 Gnome 40.4. Most other ways of traversing workspaces look fine but using touchpad gestures does this double animation playback thing. It does not happen without this extension.

mzur commented 3 years ago

Thanks @KristianUSN! Now we need someone with an appropriate device to have a look at the code.

MonsieurLanza commented 3 years ago

Here is what happens, first without wsmatrix extension, then with it activated. https://user-images.githubusercontent.com/4181623/137733240-442d3c04-0d85-4950-9a96-b8f6e2353283.mp4

Note that I only did simple swipe, the gnome animation follows the gesture : you can go back and forth when swiping.

pnkov commented 3 years ago

@MonsieurLanza touchegg with <action type="SEND_KEYS"> for changing workspaces works perfectly for me. But I should mention that gnome-shell-extension-x11gestures does not needed for this case and causes some problems.

Barben360 commented 2 years ago

I can confirm the problem happens for me too, seems like the event "workspace changed from x to y" is triggerred after the gesture is over (always left-right or right-left) and so workspace matrix animation is played while visually we already have the feeling of being on the right workspace.

When using the keyboard only workspace matrix animation is displayed (with the right direction, including up/down).

Not sure that helps but that's what I think happens.

Note that now with gnome the gesture is not a single event but you can maintain it between 2 workspaces for instance, so the real action is at release.

JorgeSivil commented 2 years ago

Not sure what's the correct procedure but +1, having the same issue.

myyc commented 1 year ago

just to add some extra details, it's not actually true that the animation is played twice, rather, two things happen.

this explanation is harder to understand in writing than to see in action, once you disable gnome-shell's animations it'll be clearer: gsettings set org.gnome.desktop.interface enable-animations false incidentally, i find that disabling animations works better with this extension in general, but you might disagree :)

filipemiguel97 commented 1 year ago

I have the same issue. I agree with what myyc said. Also, even if animations are disabled the behavior is a bit glitchy. You see a flicker of the previous screen once you are done swiping.

klondikemarlen commented 1 year ago

I have the same issue on GNOME 44.2, Wayland, Ubuntu 23.04. When I disable the extension, workspace switching via swiping works fine, so the solution to this issue might be to remove the workspace switching code if the GNOME version is high enough? You would definitely need to keep the wrap-around feature though since GNOME doesn't support it. Wrap-around is my primary reason for using this extension :)

4r7if3x commented 7 months ago

I have the same issue on GNOME 45 and I have v43 of the extension installed. I'm not fond of disabling animations, although it would solve the problem. Is this going to be patched anytime soon?

mzur commented 7 months ago

Is this going to be patched anytime soon?

Since I don't have the hardware to test this, someone else has to pick it up. I'm afraid this won't be anytime soon.

4r7if3x commented 7 months ago

Is this going to be patched anytime soon?

Since I don't have the hardware to test this, someone else has to pick it up. I'm afraid this won't be anytime soon.

Do you need a specific hardware for this? Doesn't this happen when you use the mouse?

mzur commented 7 months ago

You need a trackpad or a touchscreen and I have neither.

4r7if3x commented 7 months ago

You need a trackpad or a touchscreen and I have neither.

I have the trackpad if I can be of any help, but I don't know where to start. Any guidance?

mzur commented 7 months ago

You probably have to start with the custom WorkspaceAnimationController: https://github.com/mzur/gnome-shell-wsmatrix/blob/bfcc56b5e10c3b4596e928bf19b1a994bddaee9c/wsmatrix%40martin.zurowietz.de/workspacePopup/workspaceAnimation.js#L220-L256

The original class has an animateSwitch method which should be responsible for the animation. This is not changed by this extension, however, so I don't know what's going wrong here.

croci commented 1 month ago

+1 I can confirm this happens also on GNOME 46/47 Wayland.

croci commented 1 month ago

As a temporary workaround I am using this extension which disables this animation. Possibly it could be incorporated into this extension as well?

https://github.com/amalantony/gnome-shell-extension-instant-workspace-switcher