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

Animation #26

Open
KVolker opened this issue Dec 30, 2022 · 10 comments
Open

Animation #26

KVolker opened this issue Dec 30, 2022 · 10 comments

Comments

@KVolker
Copy link

KVolker commented Dec 30, 2022

A minor request, but nice to have:

If I use the Windows shortcuts CTRL-WIN-RIGHT or LEFT Windows switches between virtual desktops, it shows that animated swiping to the respective side. Is it possible to switch that on also in VD.ahk?

Just a thought.

@FuPeiJiang
Copy link
Owner

FuPeiJiang commented Dec 30, 2022

there is no api, from the repos I "copy" code from, that enables animation
Ciantic/VirtualDesktopAccessor#29 (comment)
Grabacr07/VirtualDesktop#23
MScholtes/VirtualDesktop#16

because there's only animation when you switch to adjacent virtual desktop, there is no loss of functionality if you do:
Send % "^#{right}"
Send % "^#{left}"

Grabacr07/VirtualDesktop#23 (comment)
I don't know what this does, but it seems too short to simulate the animation


update:
Grabacr07/VirtualDesktop#23 (comment)
I just compiled this and it works, seamlessly too

there is no loss of functionality

I stand corrected : even if you jump 2 virtual desktops, it uses 1 animation, I expected there to be no animation

@TWF1212
Copy link

TWF1212 commented Mar 16, 2024

With the latest version is there any way to remove the animation? I liked it much better when it was instant with no animation at all.

Luckily the old version I have is still working for me, I wanted to upgrade but won't if I have to use the animation on change.

I think if it is still possible to do the switch with no animation, can you add a class parameter (or something) we can set to choose instant or animation maybe?

Thank you.

@FuPeiJiang
Copy link
Owner

It is possible to add the no-animation way back, but you can disable animations in windows appearance settings, is there a downside to that ?

@TWF1212
Copy link

TWF1212 commented Mar 16, 2024

I tried adding the no-animation back in as a different function, but it no longer worked. I kind of like the animation when using Windows hotkeys to go to next/previous. But I want if I use a Hotkey with this library, it goes automatically with no animation.

I'll just keep trying to work out the code of adding it back in myself.

Thank you.

@FuPeiJiang
Copy link
Owner

I see: animation for windows builtin hotkeys, no-animation for ahk custom hotkeys

I'm gonna add it like this:
VD.animation_on:=false
Any improvements/ideas on this before I add it ?

@FuPeiJiang
Copy link
Owner

This flag/boolean should be useless in windows 11 since even builtin hotkeys don't have animation

@TWF1212
Copy link

TWF1212 commented Mar 17, 2024

I see: animation for windows builtin hotkeys, no-animation for ahk custom hotkeys

I'm gonna add it like this: VD.animation_on:=false Any improvements/ideas on this before I add it ?

I can't think of any other improvements over that.

Thank you very much for working on this, and so quickly too!

I appreciate it.

@FuPeiJiang
Copy link
Owner

This flag/boolean should be useless in windows 11 since even builtin hotkeys don't have animation

this is wrong information, windows 11 has an animation too, I don't know what I was thinking

@FuPeiJiang
Copy link
Owner

an early version of windows 11 had no animation at all
for later versions of windows 11, we can use SwitchDesktopWithAnimation(IVirtualDesktop) for animation
for windows 10, we can use SetForegroundWindow(HWND) for animation, where the HWND is located in the target VD

the SetForegroundWindow(HWND) method switches correctly but doesn't provide an animation in windows 11, that's why SwitchDesktopWithAnimation(IVirtualDesktop) is needed for windows 11

in all versions of windows, SwitchDesktop(IVirtualDesktop) has no animation

FuPeiJiang added a commit that referenced this issue Apr 1, 2024
@FuPeiJiang
Copy link
Owner

@TWF1212
well, here it is, sorry for the long wait
please report additional bugs that may occur when using VD.animation_on:=false

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

No branches or pull requests

3 participants