t1m0thyj / WinDynamicDesktop

Port of macOS Mojave Dynamic Desktop feature to Windows
https://windd.info
Mozilla Public License 2.0
4.38k stars 292 forks source link

Limitations of Windows wallpaper APIs #321

Closed t1m0thyj closed 2 years ago

t1m0thyj commented 3 years ago
rocksdanister commented 3 years ago

@t1m0thyj

No fade transition so image change is jarring/unnatural

This depends on Windows Animate controls and elements settings

t1m0thyj commented 3 years ago

@watermarkhu @7HE-W0R1D Could you please try this build of WDD? It should set the wallpaper across multiple virtual desktops: https://ci.appveyor.com/project/t1m0thyj/windynamicdesktop/builds/39692425/artifacts

7HE-W0R1D commented 3 years ago

Just got some time to try and I installed the UWP version, but it gives me an error when clicking Apply. I've attached the log here. WinDynamicDesktop.exe.log Seems that the program treats win11 as an unsupported version so it throws that error?

watermarkhu commented 3 years ago

@t1m0thyj Setting the same theme across multiple desktops works fine on 21H1 (19043). But I'm not sure whether this build already uses the new API. I have left the Dev channel of the insider builds due to stability issues.

0mri commented 3 years ago

@t1m0thyj got this error when open WDD on new win11 insider preview.

InkedScreenshot 2021-06-28 230011_LI

WinDynamicDesktop.exe.log

t1m0thyj commented 3 years ago

I created a new build, could you please try it? I don't know if it'll work on Windows 11, currently the latest version of Windows I have access to test is Windows 10 Insiders (dev edition) and it works there.

7HE-W0R1D commented 3 years ago

I created a new build, could you please try it? I don't know if it'll work on Windows 11, currently the latest version of Windows I have access to test is Windows 10 Insiders (dev edition) and it works there.

@t1m0thyj yes I can confirm this one works on Win 11 ver22000 and all the wallpapers are switching without problems. Thanks for the quick fix!🎉

0mri commented 3 years ago

now it's working, but sometimes i get this error

[2021-06-30 16:53:44.125] System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
   at WinDynamicDesktop.IVirtualDesktopManagerInternal.GetCurrentDesktop(IntPtr hWndOrMon)
   at WinDynamicDesktop.VirtualDesktopApi.SetWallpaper(String imagePath)
   at WinDynamicDesktop.WallpaperChangeScheduler.SetWallpaper(Int32 imageId)
   at WinDynamicDesktop.WallpaperChangeScheduler.RunScheduler(Boolean forceImageUpdate)
   at WinDynamicDesktop.MainMenu.OnRefreshItemClick(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
t1m0thyj commented 3 years ago

@0mri Please try again, it should be fixed now: https://ci.appveyor.com/project/t1m0thyj/windynamicdesktop/builds/39839450/artifacts

0mri commented 3 years ago

@t1m0thyj now i get this error when scheduled wallpaper change

[2021-07-02 16:52:40.591] System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
   at WinDynamicDesktop.IVirtualDesktopManagerInternal.GetCurrentDesktop(IntPtr hWndOrMon)
   at WinDynamicDesktop.VirtualDesktopApi.SetWallpaper(String imagePath)
   at WinDynamicDesktop.WallpaperApi.<>c__DisplayClass4_0.<SetWallpaper>b__0()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
t1m0thyj commented 3 years ago

@0mri I now have access to Win11 and think the issue is fixed, could you please try https://ci.appveyor.com/project/t1m0thyj/windynamicdesktop/builds/39873093/artifacts

NyaMisty commented 3 years ago

@t1m0thyj Hi I found this issue from @Grabrcr07's repo.

Windows have been changing interface every half year now, so I strongly suggest that we move to a newer repo like @mntone's instead of manually maintaining those internal interfaces.

And also, @mntone's repo have already added wallpaper support.

t1m0thyj commented 3 years ago

@NyaMisty I agree that manually maintaining the internal interfaces is not ideal. Before doing so I attempted to use @mntone's repo, but found that it doesn't work in a Microsoft Store app because it has to compile a DLL the first time it runs on your machine. If there's a way to work around this, I'm definitely open to using the latest fork of the VirtualDesktop package.

Edit: After enabling dynamic code generation for the Microsoft Store app, the VirtualDesktop package is working.

t1m0thyj commented 2 years ago

These 3 features have been implemented in WDD v5.