Open ondras opened 4 years ago
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.
@Ciantic okay, thanks for the explanation!
Let's keep this open, maybe someone knows how to do it.
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.
Oh noes, it doesn't look like it. They are calling the keyboard shortcut to "fake it".
Cheaters! :)
(Well... pretty doable in AHK as well :smile:)
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.
@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.
I think the function isn't used anymore if this article is true.
Windows 11 may have removed the whole animation:
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.
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).
@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.
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?