Windows 11 中的 macOS 绿色按钮行为 — 将任何窗口最大化到自己的虚拟桌面
Bring macOS's green-button "maximize to full-screen virtual desktop" behavior to Windows 11.
When triggered, the foreground window is moved to a brand-new virtual desktop and maximized. Closing, un-maximizing, or toggling the hotkey again restores everything — the window returns to its original desktop and size, and the temporary desktop is removed.
| Trigger | How |
|---|---|
| Hotkey | Ctrl + Alt + Shift + X — toggles the foreground window |
| Shift + Click | Hold Shift and click a window's maximize button |
The app runs in the system tray. Right-click the tray icon for options:
[MVD] ProcessName so you can identify it in Task View.The app auto-detects your Windows build and selects the correct COM vtable layout. If a future Windows update breaks things, the app enters degraded mode and checks for updates automatically.
Shift+Click works wherever Windows 11 Snap Layouts works — apps that correctly handle WM_NCHITTEST and return HTMAXBUTTON. This includes:
| App | Works? |
|---|---|
| Notepad, Explorer, traditional Win32 | ✅ |
| Windows Terminal (WinUI) | ✅ |
| VS Code (Electron 13+) | ✅ |
| Visual Studio | ✅ |
| Apps with fully custom title bars | ❌ (use hotkey) |
The hotkey always works, regardless of the window type.
dotnet builddotnet publish -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true…Zero NuGet dependencies. COM interop declarations are vendored from MScholtes/VirtualDesktop (MIT license, actively maintained). The app ships two vtable layouts (pre-24H2 and 24H2+) and auto-selects the correct one with a smoke test fallback.
IDisposable on every native resource. No fire-and-forget. All WinEvent callbacks marshal to the UI thread.[MVD] in Task View for easy manual identification.Microsoft's Virtual Desktop feature has a proper, documented COM interface — IVirtualDesktopManager — but it can only tell you which desktop a window is on and move a window you own between desktops. The actually useful operations — creating desktops, switching desktops, moving any window, naming desktops — all live behind undocumented COM interfaces like IVirtualDesktopManagerInternal and IVirtualDesktop.
The problem? Microsoft changes the interface GUIDs with nearly every major Windows update. Not the methods. Not the signatures. Just the GUIDs. This means every app that uses virtual desktop automation — this one, Peach, FancyWM, and dozens of others — breaks silently 2-3 times a year and has to scramble to update hardcoded GUIDs.
This is the single biggest fragility in this app. When it breaks, the app shows an error dialog on startup saying "Failed to initialize Virtual Desktop COM interface." The fix is straightforward but shouldn't be necessary:
VirtualDesktop11-24H2.cs) and typically updates within days of a new Windows build. Huge thanks to him for doing this thankless work for the entire community.DesktopManagerAdapter.cs and a new COM interface in VirtualDesktopCom.cs.| Interface | What it does | Stable? |
|---|---|---|
IVirtualDesktopManager |
Check/move owned windows | ✅ Documented, stable since Win10 |
IServiceProvider10 |
Standard COM service lookup | ✅ Stable |
IObjectArray |
Standard COM collection | ✅ Stable |
IVirtualDesktop |
Desktop identity, name, wallpaper | ⚠️ Breaks with Windows updates |
IVirtualDesktopManagerInternal |
Create, switch, move, remove desktops | ⚠️ Breaks with Windows updates |
IApplicationView |
Window view for cross-process moves | ⚠️ Breaks with Windows updates |
IApplicationViewCollection |
Get views by window handle | ⚠️ Breaks with Windows updates |
Please stabilize the Virtual Desktop COM interfaces or provide a proper public API. Every third-party virtual desktop tool in the ecosystem depends on reverse-engineered GUIDs that break with every update. A stable API for creating, switching, naming, and moving windows between virtual desktops would eliminate an entire class of fragility. PowerToys has asked for this too.
MIT
Credit to Kieran Mockford for the original idea. May he rest in peace.
暂无开放 Issues,或尚未同步最近议题。