Git Product home page Git Product logo

Comments (13)

reidprichard avatar reidprichard commented on July 27, 2024 3

Yeah, I figured I could live with a few bugs in the beta program but didn't expect it would break something so crucial to my workflow!

from vd.ahk.

JanChec avatar JanChec commented on July 27, 2024 2

Broken here too. Since this update will be live for standard users of Windows 11 soon, I'd love to have it fixed.

I'm using:
https://github.com/FuPeiJiang/VD.ahk/blob/class_VD/_VD.ahk

from vd.ahk.

Viqsi avatar Viqsi commented on July 27, 2024 2

Updating another machine revealed that I was guessing the version numbers wrong. So I gave in and forked it. https://github.com/Viqsi/VD.ah2

from vd.ahk.

JanChec avatar JanChec commented on July 27, 2024 1

Thanks @Viqsi! :) I've applied the update to _VD.ahk, basically the same diff but without the new splitByDot calculation and revNumber and it works: https://gist.github.com/JanChec/a555a42c949ff5f6b78e92362143a9d2

from vd.ahk.

hamen avatar hamen commented on July 27, 2024

I'm afraid I'm seeing the same issue: the latest update broke it 🤦
Regretting being on the Beta program so much right now 🤣

from vd.ahk.

rushvora avatar rushvora commented on July 27, 2024

I imagine this explains why the window moving feature doesn't work anymore.

from vd.ahk.

bfarmilo avatar bfarmilo commented on July 27, 2024

Looks like VirtualDesktop.cs has been updated, and VirtualDesktop11-23H2.cs should work, see VirtualDesktop/issues/67. I'm not sure how to do this, though, can you point me in the right direction and I can try to do a PR to test this

from vd.ahk.

Viqsi avatar Viqsi commented on July 27, 2024

This is as far as I got. Providing as a diff rather than a pull request because I'm not really prepared to go further (and I never actually forked the repo):

diff --git a/VD.ah2 b/VD.ah2
index d90394e..6a78111 100644
--- a/VD.ah2
+++ b/VD.ah2
@@ -19,7 +19,7 @@ class VD {
       this._dll_CreateDesktop := this._dll_CreateDesktop_Win10
       this._dll_GetName := this._dll_GetName_Win10
       this.RegisterDesktopNotifications := this.RegisterDesktopNotifications_Win10
-    } else {
+    } else if (buildNumber < 22620) {
       IID_IVirtualDesktopManagerInternal_ := "{B2F925B9-5A0F-4D2E-9F4D-2B1507593C10}"
       IID_IVirtualDesktop_ := "{536D3495-B208-4CC9-AE26-DE8111275BF8}"
       this._dll_GetCurrentDesktop := this._dll_GetCurrentDesktop_Win11
@@ -27,6 +27,14 @@ class VD {
       this._dll_CreateDesktop := this._dll_CreateDesktop_Win11
       this._dll_GetName := this._dll_GetName_Win11
       this.RegisterDesktopNotifications := this.RegisterDesktopNotifications_Win11
+    } else {
+      IID_IVirtualDesktopManagerInternal_ := "{A3175F2D-239C-4BD2-8AA0-EEBA8B0B138E}"
+      IID_IVirtualDesktop_ := "{3F07F4BE-B107-441A-AF0F-39D82529072C}"
+      this._dll_GetCurrentDesktop := this._dll_GetCurrentDesktop_Win10
+      this._dll_GetDesktops := this._dll_GetDesktops_Win10
+      this._dll_CreateDesktop := this._dll_CreateDesktop_Win10
+      this._dll_GetName := this._dll_GetName_Win11
+      this.RegisterDesktopNotifications := this.RegisterDesktopNotifications_Win11
     }
     this.IVirtualDesktopManager := ComObject("{AA509086-5CA9-4C25-8F95-589D3C07B48A}", "{A5CD92FF-29BE-454C-8D04-D82879FB3F1B}")
     this.GetWindowDesktopId := this._vtable(this.IVirtualDesktopManager.Ptr, 4)
@@ -41,7 +49,7 @@ class VD {
       this.Ptr_CreateDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 10)
       this.Ptr_RemoveDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 11)
       this.FindDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 12)
-    } else if (buildNumber < 22489) {
+    } else if (buildNumber < 22489 or buildNumber >= 22621) {
       this.GetDesktops := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 7)
       this.Ptr_CreateDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 10)
       this.Ptr_RemoveDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 12)

My usage of VD.ahk is limited to exactly four methods: getNameFromDesktopNum, goToDesktopNum, MoveWindowToDesktopNum, and getCurrentDesktopNum. This works for those methods. I have absolutely no idea if any of the others work or not with this change and have no reasonable means of testing. But maybe it'll help.

Basically I started with "it looks like they changed a lot of the function params back to the way they had them in Win10" (based on staring very very hard at that VirtualDesktop.cs project code) and started trial-and-error switching to those instead.

from vd.ahk.

reidprichard avatar reidprichard commented on July 27, 2024

Seems to be working for me (Win11 10.0.22631), super appreciate the efforts!

from vd.ahk.

Viqsi avatar Viqsi commented on July 27, 2024

Seems to be working for me (Win11 10.0.22631), super appreciate the efforts!

It's not just the build number, it's the build revision as well; that's what makes this so annoying. 10.0.22631.2134 and earlier revisions are fine with the Old Ways, but 10.0.22631.2283 is not. I suspect the change happened with the preview release 10.0.22631.2215 (and that's what I checked for in the fork), but don't have actual confirmation of that as I don't do preview releases.

from vd.ahk.

reidprichard avatar reidprichard commented on July 27, 2024

Hmm, I did just see an update (in the Release Preview channel), so hopefully that doesn't complicate things. At any rate, I am on 10.22631.2361 now, and I believe VD stopped working for me on 10.0.22631.2050.

from vd.ahk.

phazei avatar phazei commented on July 27, 2024

Just a heads up to the others in this thread that the GUID for the COM has also changed with this months release. Fix in this PR #62

from vd.ahk.

Viqsi avatar Viqsi commented on July 27, 2024

So far as I can tell this was resolved with 02f37bf. (The referenced commit above presumably fixed it for the AHKv1 version; this one fixes it for the v2 version). At least, I tested it and it Works For Me on build 22631.3155, so I've closed the PR from my fork and will be doing a pull shortly (read: as soon as I get around to it, if I get around to it ;) ).

from vd.ahk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.