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? #29

Open
ondras opened this issue Feb 6, 2020 · 12 comments
Open

animation? #29

ondras opened this issue Feb 6, 2020 · 12 comments

Comments

@ondras
Copy link

ondras commented Feb 6, 2020

Hi,

switching Desktops appears to be instant, as opposed to the nice "swipe" animation provided by the default ctrl+win+arrow implementation. Is it possible to maintain the animation when exposing the API?

@Ciantic
Copy link
Owner

Ciantic commented Feb 6, 2020

It's a good question, and I remember when I created this that I wanted that too.

However I don't see any setting to enable it, the function SwitchDesktop in the API does not take any parameters.

@ondras
Copy link
Author

ondras commented Feb 6, 2020

@Ciantic okay, thanks for the explanation!

@ondras ondras closed this as completed Feb 6, 2020
@Ciantic
Copy link
Owner

Ciantic commented Feb 6, 2020

Let's keep this open, maybe someone knows how to do it.

@Ciantic Ciantic reopened this Feb 6, 2020
@ondras
Copy link
Author

ondras commented Feb 6, 2020

This app seems to do animation as well...

@Ciantic
Copy link
Owner

Ciantic commented Feb 6, 2020

Hey thanks! More discoveries! SwitchDesktop actually does take parameter, according the code you gave, it's now doable.

However I'm a bit busy right now, but it should be doable from the code you gave.

@Ciantic
Copy link
Owner

Ciantic commented Feb 6, 2020

Oh noes, it doesn't look like it. They are calling the keyboard shortcut to "fake it".

@ondras
Copy link
Author

ondras commented Feb 6, 2020

Cheaters! :)

(Well... pretty doable in AHK as well 😄)

@mzomparelli
Copy link

There is a method in IVirtualDesktopManagerInternal that might allow us to get the animation:

IVirtualDesktopManagerInternal.SwitchDesktopWithAnimation(IVirtualDesktop desktop)

It has the same signature so it should work like a drop in replacement

IVirtualDesktopManagerInternal.SwitchDesktop(IVirtualDesktop desktop)

I haven't tested this but I plan to at some point.

@Ciantic
Copy link
Owner

Ciantic commented Oct 13, 2023

@mzomparelli thanks for updating, I see the Python script we now use outputs that.

I'm testing with that now on my animation feature branch https://github.com/Ciantic/VirtualDesktopAccessor/tree/feature/animation

It switches desktop that's for sure, but for some reason, I don't get the switch desktop animation. I don't get those animations even with Windows+Ctrl+Left/Right at the moment, so I can't verify if it works or not, something else might be broken on my Windows 11.

@Ciantic
Copy link
Owner

Ciantic commented Oct 14, 2023

I think the function isn't used anymore if this article is true.

Windows 11 may have removed the whole animation:

https://answers.microsoft.com/en-us/windows/forum/all/windows-11-virtual-desktop-animation/b5adac48-7c54-4fd4-8e5e-3e4adf3d3a26

I checked on Windows Insider Build and stable channel PCs, both do not have the switching animation. The last update was, Microsoft removed it:

https://blogs.windows.com/windows-insider/2021/...

We’ve turned off the animation when switching Desktops using the keyboard shortcuts as it was leading to flashes and hangs.

@Lej77
Copy link

Lej77 commented Sep 15, 2024

For now at least it seems Windows 11 does offer a different function that uses animations when switching current virtual desktop. There are some extra methods in the COM interface IVirtualDesktopManagerInternal that needs to be added here.

I got it working in my virtual-desktop-manager-rs program that uses my fork of the winvd library. I also built a modified VirtualDesktopAccessor.dll that has an extra DLL function fn GoToDesktopNumberWithAnimation(desktop_number: i32) -> i32 that should switch desktop with an animation.

The animation works when I tested it on Windows 11 23H2 (OS Build 22631.4169).

@Ciantic
Copy link
Owner

Ciantic commented Sep 22, 2024

@Lej77 I also have an old branch with that https://github.com/Ciantic/VirtualDesktopAccessor/tree/feature/animation

Last time I checked it didn't trigger animation but changed desktop normally without animation. I will try again when I come around to this.

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

4 participants