-
Notifications
You must be signed in to change notification settings - Fork 134
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
Add support for the latest Windows 10 build #57
base: master
Are you sure you want to change the base?
Conversation
@mntone I'm having issues with this PR on Win10 Insiders 21390.1010. Below is the code that I'm testing with. The first message box is shown, so multiple virtual desktops are correctly detected. But the CurrentChanged event never fires. VirtualDesktopProvider.Default.Initialize().Wait();
MessageBox.Show("Found " + VirtualDesktop.GetDesktops().Length.ToString() + " desktops");
VirtualDesktop.CurrentChanged += (sender, e) => MessageBox.Show("Active desktop changed"); When I run this same code on Win10 19043.1052, the CurrentChanged event fires when I switch desktops and triggers the second message box as expected. |
@t1m0thyj Thank you for your comment. I confirmed that the interface [Guid("cd403e52-deed-4c13-b437-b98380f2b1e8")]
interface IVirtualDesktopNotification : IUnknown {
HRESULT Proc3(/* Stack Offset: 4 */ [In] IObjectArray* p0, /* Stack Offset: 8 */ [In] IVirtualDesktop* p1);
HRESULT Proc4(/* Stack Offset: 4 */ [In] IObjectArray* p0, /* Stack Offset: 8 */ [In] IVirtualDesktop* p1, /* Stack Offset: 12 */ [In] IVirtualDesktop* p2);
HRESULT Proc5(/* Stack Offset: 4 */ [In] IObjectArray* p0, /* Stack Offset: 8 */ [In] IVirtualDesktop* p1, /* Stack Offset: 12 */ [In] IVirtualDesktop* p2);
HRESULT Proc6(/* Stack Offset: 4 */ [In] IObjectArray* p0, /* Stack Offset: 8 */ [In] IVirtualDesktop* p1, /* Stack Offset: 12 */ [In] IVirtualDesktop* p2);
HRESULT Proc7(/* Stack Offset: 4 */ [In] int p0);
HRESULT Proc8(/* Stack Offset: 4 */ [In] IObjectArray* p0, /* Stack Offset: 8 */ [In] IVirtualDesktop* p1, /* Stack Offset: 12 */ [In] int p2, /* Stack Offset: 16 */ [In] int p3);
HRESULT Proc9(/* Stack Offset: 4 */ [In] IVirtualDesktop* p0, /* Stack Offset: 8 */ [In] HSTRING p1);
HRESULT Proc10(/* Stack Offset: 4 */ [In] IApplicationView* p0);
HRESULT Proc11(/* Stack Offset: 4 */ [In] IObjectArray* p0, /* Stack Offset: 8 */ [In] IVirtualDesktop* p1, /* Stack Offset: 12 */ [In] IVirtualDesktop* p2);
HRESULT Proc12(/* Stack Offset: 4 */ [In] IVirtualDesktop* p0, /* Stack Offset: 8 */ [In] HSTRING p1);
} I dealt with it. Note: The method |
@mntone Thanks for your quick response, I'm afraid the interface may have changed again in build 21390 because I've pulled your latest changes and the |
@t1m0thyj I confirmed that the event would work on build 21390. Could you tell me the I'm using OleViewDotNet to get the interface. The operation is as follows:
The 32-bit version may provide more detailed information. |
@mntone My |
Maybe we can merge it as Windows 11 is quickly rolling out to both Dev and Beta channel? |
EDIT: This is not necessary if you correctly add an app.manifest - I finally worked out how to do that! However without one System.Runtime.InteropServices.RuntimeInformation.OSDescription may be a better way to get the build number - requires parsing the string though. Not sure the best way to contribute this as I just don't get Git / GitHub yet - I came through the CVS -> SVN and then Mercurial path. To get this branch to work for me I had to make this change because my OSBuild is still 9200 (but I'm trying to make my project work for Win 11 too (https://sourceforge.net/p/virtual-desktop-grid-switcher/). All the functionality I need seems to work. Should I just try to push this to PR - suspect that isn't the way things work! |
Unfortunately as of 22449 this is broken again, here's an example stack:
|
Well we should probably consider this repo as abandoned / discontinued. |
@anaisbetts I've re-adapted @mntone's fork to 22454 mntone#1 |
Yes, I was thinking the same. |
…bc37900ece3d7131 --HG-- branch : Win11
Fix issue #55 & #56.
Solve the problem of replacing the new interface in the Dev Channel. It also supports the new features.
It includes an implementation that changes the files that compile based on the Windows 10 build because of adding support the new interfaces.
It hasn't yet been confirmed whether 20211 – 20226 use the case 1 or 2.
Note: this PR is based on the previous one #50.
#55, #56 を修正します。
Dev ChannelのWindows 10で新しいインターフェイスに差し代わっている問題に対応します。
また,新しいインターフェイスで追加された機能に対応します。
新しいインターフェイスに対応するために Windows 10 のビルド番号に基づいてコンパイルするファイルを変更する実装が含まれます。
※ 20211〜20226は1と2のどちらのインターフェイスを採用しているか未確認
なお,この PR は前回の PR #50 を元に作成しています。