Skip to content

Commit

Permalink
Update VirtualDesktop library to support newer Windows 10 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus-L committed Aug 17, 2019
1 parent 1f674c1 commit b27f8cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions FreeVD/App/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Linq;
using System.Text;
using WindowsDesktop;
using WindowsDesktop.Interop;

namespace FreeVD
{
Expand All @@ -15,7 +14,7 @@ public static IEnumerable<Window> GetOpenWindows()
{
IntPtr shellWindow = User32.GetShellWindow();
var windows = new List<Window>();
User32.EnumWindows((handle,lParam) =>
User32.EnumWindows((handle, lParam) =>
{
if (handle != shellWindow &&
User32.IsWindowVisible(handle) &&
Expand Down Expand Up @@ -59,12 +58,13 @@ public int DesktopNumber
try
{
if (GetProcess().Id != Process.GetCurrentProcess().Id &&
ComObjects.GetVirtualDesktopManager().GetWindowDesktopId(Handle) != Guid.Empty)
(VirtualDesktop.FromHwnd(Handle) != null || IsPinnedWindow))
//ComObjects.GetVirtualDesktopManager().GetWindowDesktopId(Handle) != Guid.Empty)
{
return (IsPinnedWindow ? VirtualDesktop.Current : VirtualDesktop.FromHwnd(Handle)).GetNumber();
}
}
catch (Exception ex) when (ex.HResult == Consts.TYPE_E_ELEMENTNOTFOUND) {}
catch (Exception ex) when (ex.HResult == Consts.TYPE_E_ELEMENTNOTFOUND) { }
catch (Exception ex)
{
Log.LogEvent("Window", $"Handle: {Handle}\nCaption: {GetWindowText()}", ex);
Expand Down
2 changes: 1 addition & 1 deletion FreeVD/FreeVD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<Reference Include="UIAutomationClient" />
<Reference Include="UIAutomationTypes" />
<Reference Include="Windows">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd</HintPath>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Annotated\Windows.winmd</HintPath>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion VirtualDesktop
Submodule VirtualDesktop updated 67 files
+8 −8 .editorconfig
+1 −3 appveyor.yml
+1 −1 samples/VirtualDesktop.Showcase/App.config
+2 −0 samples/VirtualDesktop.Showcase/MainWindow.xaml
+25 −2 samples/VirtualDesktop.Showcase/MainWindow.xaml.cs
+1 −1 samples/VirtualDesktop.Showcase/Properties/Resources.Designer.cs
+1 −1 samples/VirtualDesktop.Showcase/Properties/Settings.Designer.cs
+1 −1 samples/VirtualDesktop.Showcase/VirtualDesktop.Showcase.csproj
+ source/VirtualDesktop (LocalAppData).lnk
+25 −3 source/VirtualDesktop.WPF/ApplicationExtensions.cs
+1 −1 source/VirtualDesktop.WPF/VirtualDesktop.WPF.csproj
+25 −5 source/VirtualDesktop.WPF/WindowExtensions.cs
+9 −0 source/VirtualDesktop.WinForms/FormExtensions.cs
+1 −1 source/VirtualDesktop.WinForms/VirtualDesktop.WinForms.csproj
+16 −16 source/VirtualDesktop.WinForms/VirtualDesktop.WinForms.nuspec
+5 −2 source/VirtualDesktop.sln
+14 −0 source/VirtualDesktop.sln.DotSettings
+1,065 −0 source/VirtualDesktop/App_Packages/Source.JetBrains.Annotations_11.1.1/JetBrains.Annotations.cs
+14 −8 source/VirtualDesktop/ApplicationHelper.cs
+10 −0 source/VirtualDesktop/Interop/(interfaces)/AssemblyInfo.cs
+5 −38 source/VirtualDesktop/Interop/(interfaces)/IApplicationView.cs
+2 −2 source/VirtualDesktop/Interop/(interfaces)/IApplicationViewCollection.cs
+38 −0 source/VirtualDesktop/Interop/(interfaces)/IVirtualDesktop.cs
+31 −0 source/VirtualDesktop/Interop/(interfaces)/IVirtualDesktopManagerInternal.cs
+56 −0 source/VirtualDesktop/Interop/(interfaces)/IVirtualDesktopNotification.cs
+15 −15 source/VirtualDesktop/Interop/(interfaces)/IVirtualDesktopNotificationService.cs
+1 −1 source/VirtualDesktop/Interop/(interfaces)/IVirtualDesktopPinnedApps.cs
+63 −0 source/VirtualDesktop/Interop/(wrappers)/ApplicationView.cs
+19 −0 source/VirtualDesktop/Interop/(wrappers)/ApplicationViewCollection.cs
+66 −0 source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopManagerInternal.cs
+53 −0 source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopNotification.cs
+32 −0 source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopNotificationService.cs
+43 −0 source/VirtualDesktop/Interop/(wrappers)/VirtualDesktopPinnedApps.cs
+10 −0 source/VirtualDesktop/Interop/AdjacentDesktop.cs
+21 −0 source/VirtualDesktop/Interop/ComInterface.cs
+49 −0 source/VirtualDesktop/Interop/ComInterfaceAssembly.cs
+148 −0 source/VirtualDesktop/Interop/ComInterfaceAssemblyProvider.cs
+37 −0 source/VirtualDesktop/Interop/ComInterfaceWrapperAttribute.cs
+64 −0 source/VirtualDesktop/Interop/ComInterfaceWrapperBase.cs
+33 −77 source/VirtualDesktop/Interop/ComObjects.cs
+1 −0 source/VirtualDesktop/Interop/HResult.cs
+85 −0 source/VirtualDesktop/Interop/IID.cs
+2 −2 source/VirtualDesktop/Interop/IObjectArray.cs
+2 −2 source/VirtualDesktop/Interop/IServiceProvider.cs
+0 −15 source/VirtualDesktop/Interop/IVirtualDesktop.cs
+2 −2 source/VirtualDesktop/Interop/IVirtualDesktopManager.cs
+0 −89 source/VirtualDesktop/Interop/IVirtualDesktopManagerInternal.cs
+0 −23 source/VirtualDesktop/Interop/IVirtualDesktopNotification.cs
+0 −249 source/VirtualDesktop/Interop/VirtualDesktopManagerInternal.cs
+3 −3 source/VirtualDesktop/Properties/AssemblyInfo.cs
+42 −0 source/VirtualDesktop/Properties/ProductInfo.cs
+68 −0 source/VirtualDesktop/Properties/Settings.Designer.cs
+36 −0 source/VirtualDesktop/Properties/Settings.settings
+23 −29 source/VirtualDesktop/VirtualDesktop.cs
+40 −9 source/VirtualDesktop/VirtualDesktop.csproj
+3 −0 source/VirtualDesktop/VirtualDesktop.csproj.DotSettings
+1 −1 source/VirtualDesktop/VirtualDesktop.nuspec
+44 −83 source/VirtualDesktop/VirtualDesktop.static.cs
+21 −34 source/VirtualDesktop/VirtualDesktop.static.notification.cs
+38 −13 source/VirtualDesktop/VirtualDesktop.static.pin.cs
+36 −0 source/VirtualDesktop/VirtualDesktopCache.cs
+1 −1 source/VirtualDesktop/VirtualDesktopChangedEventArgs.cs
+3 −3 source/VirtualDesktop/VirtualDesktopDestroyEventArgs.cs
+19 −10 source/VirtualDesktop/VirtualDesktopHelper.cs
+71 −0 source/VirtualDesktop/VirtualDesktopProvider.cs
+46 −0 source/VirtualDesktop/app.config
+4 −0 source/VirtualDesktop/packages.config

0 comments on commit b27f8cb

Please sign in to comment.