diff --git a/source/VirtualDesktop/Interop/(interfaces)/10240/IVirtualDesktopManagerInternal2.cs b/source/VirtualDesktop/Interop/(interfaces)/10240/IVirtualDesktopManagerInternal2.cs index e27bbca..d46d1fd 100644 --- a/source/VirtualDesktop/Interop/(interfaces)/10240/IVirtualDesktopManagerInternal2.cs +++ b/source/VirtualDesktop/Interop/(interfaces)/10240/IVirtualDesktopManagerInternal2.cs @@ -31,7 +31,7 @@ internal interface IVirtualDesktopManagerInternal2 void Unknown1(IVirtualDesktop pDesktop, out IObjectArray pUnknown1, out IObjectArray pUnknown2); - void SetName(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName); + void SetDesktopName(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName); } // see also: diff --git a/source/VirtualDesktop/Interop/(interfaces)/10240/IVirtualDesktopManagerInternal3.cs b/source/VirtualDesktop/Interop/(interfaces)/10240/IVirtualDesktopManagerInternal3.cs index ced94a5..bd4b503 100644 --- a/source/VirtualDesktop/Interop/(interfaces)/10240/IVirtualDesktopManagerInternal3.cs +++ b/source/VirtualDesktop/Interop/(interfaces)/10240/IVirtualDesktopManagerInternal3.cs @@ -31,7 +31,7 @@ internal interface IVirtualDesktopManagerInternal3 void Unknown1(IVirtualDesktop pDesktop, out IObjectArray pUnknown1, out IObjectArray pUnknown2); - void SetName(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName); + void SetDesktopName(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName); void Unknown2(IApplicationView pUnknown0, IApplicationView pUnknown1); } diff --git a/source/VirtualDesktop/Interop/(interfaces)/20231/IVirtualDesktopManagerInternal.cs b/source/VirtualDesktop/Interop/(interfaces)/20231/IVirtualDesktopManagerInternal.cs index 19427d3..1aaf644 100644 --- a/source/VirtualDesktop/Interop/(interfaces)/20231/IVirtualDesktopManagerInternal.cs +++ b/source/VirtualDesktop/Interop/(interfaces)/20231/IVirtualDesktopManagerInternal.cs @@ -29,12 +29,12 @@ internal interface IVirtualDesktopManagerInternal IVirtualDesktop FindDesktop([In, MarshalAs(UnmanagedType.LPStruct)] Guid desktopId); - void Unknown1(IVirtualDesktop pDesktop, out IObjectArray pUnknown1, out IObjectArray pUnknown2); + void GetDesktopSwitchIncludeExcludeViews(IVirtualDesktop pDesktop, out IObjectArray pUnknown1, out IObjectArray pUnknown2); - void SetName(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName); + void SetDesktopName(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName); - void Unknown2(IApplicationView pUnknown0, IApplicationView pUnknown1); + void CopyDesktopState(IApplicationView pUnknown0, IApplicationView pUnknown1); - int Unknown3(); + int GetDesktopIsPerMonitor(); } } diff --git a/source/VirtualDesktop/Interop/(interfaces)/21313/IVirtualDesktopManagerInternal.cs b/source/VirtualDesktop/Interop/(interfaces)/21313/IVirtualDesktopManagerInternal.cs index f31db41..52e032b 100644 --- a/source/VirtualDesktop/Interop/(interfaces)/21313/IVirtualDesktopManagerInternal.cs +++ b/source/VirtualDesktop/Interop/(interfaces)/21313/IVirtualDesktopManagerInternal.cs @@ -31,16 +31,16 @@ internal interface IVirtualDesktopManagerInternal IVirtualDesktop FindDesktop([In, MarshalAs(UnmanagedType.LPStruct)] Guid desktopId); - void Unknown1(IVirtualDesktop pDesktop, out IObjectArray pUnknown1, out IObjectArray pUnknown2); + void GetDesktopSwitchIncludeExcludeViews(IVirtualDesktop pDesktop, out IObjectArray pUnknown1, out IObjectArray pUnknown2); - void SetName(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName); + void SetDesktopName(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName); - void SetWallpaperPath(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chPath); + void SetDesktopWallpaper(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chPath); - void Unknown2([MarshalAs(UnmanagedType.HString)] string chText); + void UpdateWallpaperPathForAllDesktops([MarshalAs(UnmanagedType.HString)] string chText); - void Unknown3(IApplicationView pUnknown0, IApplicationView pUnknown1); + void CopyDesktopState(IApplicationView pUnknown0, IApplicationView pUnknown1); - int Unknown4(); + int GetDesktopIsPerMonitor(); } } diff --git a/source/VirtualDesktop/Interop/(interfaces)/22449/IVirtualDesktop.cs b/source/VirtualDesktop/Interop/(interfaces)/22449/IVirtualDesktop.cs new file mode 100644 index 0000000..86e89a7 --- /dev/null +++ b/source/VirtualDesktop/Interop/(interfaces)/22449/IVirtualDesktop.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Concurrent; +using System.Runtime.InteropServices; + +namespace WindowsDesktop.Interop +{ + [ComImport] + [Guid("00000000-0000-0000-0000-000000000000") /* replace at runtime */] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IVirtualDesktop + { + [return: MarshalAs(UnmanagedType.Bool)] + bool IsViewVisible(IApplicationView pView); + + Guid GetID(); + + IntPtr Unknown1(); + + [return: MarshalAs(UnmanagedType.HString)] + string GetName(); + + [return: MarshalAs(UnmanagedType.HString)] + string GetWallpaperPath(); + } + + // see also: + // https://github.com/MScholtes/VirtualDesktop/blob/f7c0018069f5500bce3b170a53fb71edee44ebec/VirtualDesktop.cs#L156-L173 + + public class VirtualDesktopCacheImpl : IVirtualDesktopCache + { + private readonly ConcurrentDictionary _wrappers = new ConcurrentDictionary(); + + public Func Factory { get; set; } + + public VirtualDesktop GetOrCreate(object comObject) + { + if (comObject is IVirtualDesktop) + { + return this._wrappers.GetOrAdd(((IVirtualDesktop)comObject).GetID(), id => this.Factory(id, comObject)); + } + + throw new ArgumentException(); + } + + public void Clear() + { + this._wrappers.Clear(); + } + } +} diff --git a/source/VirtualDesktop/Interop/(interfaces)/22449/IVirtualDesktopManagerInternal.cs b/source/VirtualDesktop/Interop/(interfaces)/22449/IVirtualDesktopManagerInternal.cs new file mode 100644 index 0000000..5e0e541 --- /dev/null +++ b/source/VirtualDesktop/Interop/(interfaces)/22449/IVirtualDesktopManagerInternal.cs @@ -0,0 +1,50 @@ +using System; +using System.Runtime.InteropServices; + +namespace WindowsDesktop.Interop +{ + [ComImport] + [Guid("00000000-0000-0000-0000-000000000000") /* replace at runtime */] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + internal interface IVirtualDesktopManagerInternal + { + int GetCount(IntPtr hWndOrMon); + + void MoveViewToDesktop(IApplicationView pView, IVirtualDesktop pDesktop); + + [return: MarshalAs(UnmanagedType.Bool)] + bool CanViewMoveDesktops(IApplicationView pView); + + IVirtualDesktop GetCurrentDesktop(IntPtr hWndOrMon); + + IObjectArray GetAllCurrentDesktops();//7 + + IObjectArray GetDesktops(IntPtr hWndOrMon); + + IVirtualDesktop GetAdjacentDesktop(IVirtualDesktop pDesktopReference, AdjacentDesktop uDirection); + + void SwitchDesktop(IntPtr hWndOrMon, IVirtualDesktop pDesktop); + + IVirtualDesktop CreateDesktopW(IntPtr hWndOrMon); + + IVirtualDesktop MoveDesktop(IVirtualDesktop pDesktopReference, IntPtr hWndOrMon, int nIndex); + + void RemoveDesktop(IVirtualDesktop pRemove, IVirtualDesktop pFallbackDesktop); + + IVirtualDesktop FindDesktop([In, MarshalAs(UnmanagedType.LPStruct)] Guid desktopId); + + void GetDesktopSwitchIncludeExcludeViews(IVirtualDesktop desktop, out IObjectArray unknown1, out IObjectArray unknown2);//15 + + void SetDesktopName(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName); + + void SetDesktopWallpaper(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chPath); + + void UpdateWallpaperPathForAllDesktops([MarshalAs(UnmanagedType.HString)] string wallpaper);//18 + + void CopyDesktopState(IApplicationView pView0, IApplicationView pView1);//19 + + int GetDesktopIsPerMonitor();//20 + + void GetDesktopIsPerMonitor(int state);//21 + } +} diff --git a/source/VirtualDesktop/Interop/(interfaces)/22449/IVirtualDesktopNotification.cs b/source/VirtualDesktop/Interop/(interfaces)/22449/IVirtualDesktopNotification.cs new file mode 100644 index 0000000..d75f5c4 --- /dev/null +++ b/source/VirtualDesktop/Interop/(interfaces)/22449/IVirtualDesktopNotification.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.InteropServices; + +namespace WindowsDesktop.Interop +{ + [ComImport] + [Guid("00000000-0000-0000-0000-000000000000") /* replace at runtime */] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IVirtualDesktopNotification + { + void VirtualDesktopCreated(IVirtualDesktop pDesktop); + + void VirtualDesktopDestroyBegin(IVirtualDesktop pDesktopDestroyed, IVirtualDesktop pDesktopFallback); + + void VirtualDesktopDestroyFailed(IVirtualDesktop pDesktopDestroyed, IVirtualDesktop pDesktopFallback); + + void VirtualDesktopDestroyed(IVirtualDesktop pDesktopDestroyed, IVirtualDesktop pDesktopFallback); + + void Unknown1(int nNumber); + + void VirtualDesktopMoved(IVirtualDesktop pDesktop, int nFromIndex, int nToIndex); + + void VirtualDesktopRenamed(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName); + + void ViewVirtualDesktopChanged(IApplicationView pView); + + void CurrentVirtualDesktopChanged(IVirtualDesktop pDesktopOld, IVirtualDesktop pDesktopNew); + + void VirtualDesktopWallpaperChanged(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chPath); + } + + public class VirtualDesktopNotificationListener : VirtualDesktopNotification, IVirtualDesktopNotification + { + public void VirtualDesktopCreated(IVirtualDesktop pDesktop) + { + this.VirtualDesktopCreatedCore(pDesktop); + } + + public void VirtualDesktopDestroyBegin(IVirtualDesktop pDesktopDestroyed, IVirtualDesktop pDesktopFallback) + { + this.VirtualDesktopDestroyBeginCore(pDesktopDestroyed, pDesktopFallback); + } + + public void VirtualDesktopDestroyFailed(IVirtualDesktop pDesktopDestroyed, IVirtualDesktop pDesktopFallback) + { + this.VirtualDesktopDestroyFailedCore(pDesktopDestroyed, pDesktopFallback); + } + + public void VirtualDesktopDestroyed(IVirtualDesktop pDesktopDestroyed, IVirtualDesktop pDesktopFallback) + { + this.VirtualDesktopDestroyedCore(pDesktopDestroyed, pDesktopFallback); + } + + public void Unknown1(int nNumber) + { + } + + public void VirtualDesktopMoved(IVirtualDesktop pDesktop, int nFromIndex, int nToIndex) + { + this.VirtualDesktopMovedCore(pDesktop, nFromIndex, nToIndex); + } + + public void VirtualDesktopRenamed(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName) + { + this.VirtualDesktopRenamedCore(pDesktop, chName); + } + + public void ViewVirtualDesktopChanged(IApplicationView pView) + { + this.ViewVirtualDesktopChangedCore(pView); + } + + public void CurrentVirtualDesktopChanged(IVirtualDesktop pDesktopOld, IVirtualDesktop pDesktopNew) + { + this.CurrentVirtualDesktopChangedCore(pDesktopOld, pDesktopNew); + } + + public void VirtualDesktopWallpaperChanged(IVirtualDesktop pDesktop, [MarshalAs(UnmanagedType.HString)] string chName) + { + this.VirtualDesktopWallpaperChangedCore(pDesktop, chName); + } + } +} diff --git a/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal.cs b/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal.cs index 875e739..6793b4e 100644 --- a/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal.cs +++ b/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal.cs @@ -28,8 +28,8 @@ public VirtualDesktopManagerInternal(ComInterfaceAssembly assembly, uint latestV public abstract VirtualDesktop FindDesktop(Guid desktopId); - public abstract void SetName(VirtualDesktop desktop, string name); + public abstract void SetDesktopName(VirtualDesktop desktop, string name); - public abstract void SetWallpaperPath(VirtualDesktop desktop, string path); + public abstract void SetDesktopWallpaper(VirtualDesktop desktop, string path); } } diff --git a/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal10240.cs b/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal10240.cs index b29d514..d2955e4 100644 --- a/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal10240.cs +++ b/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal10240.cs @@ -68,14 +68,14 @@ public override VirtualDesktop FindDesktop(Guid desktopId) private VirtualDesktop GetDesktop(object[] parameters = null, [CallerMemberName] string methodName = "") => VirtualDesktopCache.GetOrCreate(this.Invoke(parameters, methodName)); - public override void SetName(VirtualDesktop desktop, string name) + public override void SetDesktopName(VirtualDesktop desktop, string name) { if (this.ComVersion < 2) throw new PlatformNotSupportedException("This Windows 10 version is not supported."); this.Invoke(Args(desktop.ComObject, name)); } - public override void SetWallpaperPath(VirtualDesktop desktop, string path) + public override void SetDesktopWallpaper(VirtualDesktop desktop, string path) { throw new PlatformNotSupportedException("This Windows 10 version is not supported."); } diff --git a/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal20231.cs b/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal20231.cs index 7e3fd50..a3eba63 100644 --- a/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal20231.cs +++ b/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal20231.cs @@ -68,12 +68,12 @@ public override VirtualDesktop FindDesktop(Guid desktopId) private VirtualDesktop GetDesktop(object[] parameters = null, [CallerMemberName] string methodName = "") => VirtualDesktopCache.GetOrCreate(this.Invoke(parameters, methodName)); - public override void SetName(VirtualDesktop desktop, string name) + public override void SetDesktopName(VirtualDesktop desktop, string name) { this.Invoke(Args(desktop.ComObject, name)); } - public override void SetWallpaperPath(VirtualDesktop desktop, string path) + public override void SetDesktopWallpaper(VirtualDesktop desktop, string path) { throw new PlatformNotSupportedException("This Windows 10 version is not supported."); } diff --git a/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal21313.cs b/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal21313.cs index 10b8617..f6a8314 100644 --- a/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal21313.cs +++ b/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal21313.cs @@ -68,12 +68,12 @@ public override VirtualDesktop FindDesktop(Guid desktopId) private VirtualDesktop GetDesktop(object[] parameters = null, [CallerMemberName] string methodName = "") => VirtualDesktopCache.GetOrCreate(this.Invoke(parameters, methodName)); - public override void SetName(VirtualDesktop desktop, string name) + public override void SetDesktopName(VirtualDesktop desktop, string name) { this.Invoke(Args(desktop.ComObject, name)); } - public override void SetWallpaperPath(VirtualDesktop desktop, string path) + public override void SetDesktopWallpaper(VirtualDesktop desktop, string path) { this.Invoke(Args(desktop.ComObject, path)); } diff --git a/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal22449.cs b/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal22449.cs new file mode 100644 index 0000000..48936b8 --- /dev/null +++ b/source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal22449.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace WindowsDesktop.Interop +{ + [ComInterfaceWrapper("IVirtualDesktopManagerInternal", 22449)] + internal sealed class VirtualDesktopManagerInternal22449 : VirtualDesktopManagerInternal + { + public VirtualDesktopManagerInternal22449(ComInterfaceAssembly assembly) + : base(assembly) + { + } + + public override void MoveViewToDesktop(ApplicationView pView, VirtualDesktop desktop) + { + this.Invoke(Args(pView.ComObject, desktop.ComObject)); + } + + public override VirtualDesktop GetCurrentDesktop() + { + return this.GetDesktop(Args(IntPtr.Zero)); + } + + public override IEnumerable GetDesktops() + { + var array = this.Invoke(Args(IntPtr.Zero)); + var count = array.GetCount(); + var vdType = this.ComInterfaceAssembly.GetType("IVirtualDesktop"); + + for (var i = 0u; i < count; i++) + { + array.GetAt(i, vdType.GUID, out var ppvObject); + yield return VirtualDesktopCache.GetOrCreate(ppvObject); + } + } + + public override VirtualDesktop GetAdjacentDesktop(VirtualDesktop pDesktopReference, AdjacentDesktop uDirection) + { + return this.GetDesktop(Args(pDesktopReference.ComObject, uDirection)); + } + + public override void SwitchDesktop(VirtualDesktop desktop) + { + this.Invoke(Args(IntPtr.Zero, desktop.ComObject)); + } + + public override VirtualDesktop CreateDesktopW() + { + return this.GetDesktop(Args(IntPtr.Zero)); + } + + public override void MoveDesktop(VirtualDesktop desktop, int index) + { + this.Invoke(Args(desktop.ComObject, IntPtr.Zero, index)); + } + + public override void RemoveDesktop(VirtualDesktop pRemove, VirtualDesktop pFallbackDesktop) + { + this.Invoke(Args(pRemove.ComObject, pFallbackDesktop.ComObject)); + } + + public override VirtualDesktop FindDesktop(Guid desktopId) + { + return this.GetDesktop(Args(desktopId)); + } + + private VirtualDesktop GetDesktop(object[] parameters = null, [CallerMemberName] string methodName = "") + => VirtualDesktopCache.GetOrCreate(this.Invoke(parameters, methodName)); + + public override void SetDesktopName(VirtualDesktop desktop, string name) + { + this.Invoke(Args(desktop.ComObject, name)); + } + + public override void SetDesktopWallpaper(VirtualDesktop desktop, string path) + { + this.Invoke(Args(desktop.ComObject, path)); + } + } +} diff --git a/source/VirtualDesktop/Interop/ComInterfaceAssemblyProvider.cs b/source/VirtualDesktop/Interop/ComInterfaceAssemblyProvider.cs index d47a2dd..d90ac5e 100644 --- a/source/VirtualDesktop/Interop/ComInterfaceAssemblyProvider.cs +++ b/source/VirtualDesktop/Interop/ComInterfaceAssemblyProvider.cs @@ -20,7 +20,7 @@ internal class ComInterfaceAssemblyProvider private static readonly Regex _assemblyRegex = new Regex(@"VirtualDesktop\.(?\d{5}?)(\.\w*|)\.dll"); private static readonly string _defaultAssemblyDirectoryPath = Path.Combine(ProductInfo.LocalAppData.FullName, "assemblies"); private static readonly Version _requireVersion = new Version("1.0"); - private static readonly int[] _interfaceVersions = new[] { 10240, 20231, 21313 }; + private static readonly int[] _interfaceVersions = new[] { 10240, 20231, 21313, 22449 }; private readonly string _assemblyDirectoryPath; diff --git a/source/VirtualDesktop/Interop/ComObjects.cs b/source/VirtualDesktop/Interop/ComObjects.cs index 0397413..dd27cfa 100644 --- a/source/VirtualDesktop/Interop/ComObjects.cs +++ b/source/VirtualDesktop/Interop/ComObjects.cs @@ -40,7 +40,11 @@ private void Initialize() VirtualDesktopCache.Initialize(this._assembly); this.VirtualDesktopManager = (IVirtualDesktopManager)Activator.CreateInstance(Type.GetTypeFromCLSID(CLSID.VirtualDesktopManager)); - if (ProductInfo.OSBuild >= 21313) + if (ProductInfo.OSBuild >= 22449) + { + this.VirtualDesktopManagerInternal = new VirtualDesktopManagerInternal22449(this._assembly); + } + else if (ProductInfo.OSBuild >= 21313) { this.VirtualDesktopManagerInternal = new VirtualDesktopManagerInternal21313(this._assembly); } diff --git a/source/VirtualDesktop/VirtualDesktop.cs b/source/VirtualDesktop/VirtualDesktop.cs index 2cc2130..47ef997 100644 --- a/source/VirtualDesktop/VirtualDesktop.cs +++ b/source/VirtualDesktop/VirtualDesktop.cs @@ -47,7 +47,7 @@ public string Name { if (ProductInfo.OSBuild < 20231 && this.ComVersion < 2) throw new PlatformNotSupportedException("This Windows 10 version is not supported."); - ComInterface.VirtualDesktopManagerInternal.SetName(this, value); + ComInterface.VirtualDesktopManagerInternal.SetDesktopName(this, value); } } @@ -63,7 +63,7 @@ public string WallpaperPath { if (ProductInfo.OSBuild < 21313) throw new PlatformNotSupportedException("This Windows 10 version is not supported."); - ComInterface.VirtualDesktopManagerInternal.SetWallpaperPath(this, value); + ComInterface.VirtualDesktopManagerInternal.SetDesktopWallpaper(this, value); } } @@ -161,7 +161,7 @@ private void SetNameToCache(string name) this.RaisePropertyChanged(nameof(this.Name)); } - private void SetWallpaperPathToCache(string path) + private void SetDesktopWallpaperToCache(string path) { if (this._wallpaperPath == path) return; diff --git a/source/VirtualDesktop/VirtualDesktop.csproj b/source/VirtualDesktop/VirtualDesktop.csproj index a967169..14e6ac9 100644 --- a/source/VirtualDesktop/VirtualDesktop.csproj +++ b/source/VirtualDesktop/VirtualDesktop.csproj @@ -26,6 +26,9 @@ + + + @@ -48,6 +51,9 @@ + + + diff --git a/source/VirtualDesktop/VirtualDesktop.static.notification.cs b/source/VirtualDesktop/VirtualDesktop.static.notification.cs index d8c8fe6..8d3a4a6 100644 --- a/source/VirtualDesktop/VirtualDesktop.static.notification.cs +++ b/source/VirtualDesktop/VirtualDesktop.static.notification.cs @@ -99,7 +99,7 @@ public static void RaiseRenamed(object sender, VirtualDesktop pDesktop, string n public static void RaiseWallpaperChanged(object sender, VirtualDesktop pDesktop, string path) { var oldPath = pDesktop.WallpaperPath; - pDesktop.SetWallpaperPathToCache(path); + pDesktop.SetDesktopWallpaperToCache(path); var args = new VirtualDesktopWallpaperChangedEventArgs(pDesktop, oldPath, path); WallpaperChanged?.Invoke(sender, args);