How can we improve the Windows dev platform?

Stabilize Virtual Desktop API

Currently there's a set of COM APIs, that provide access to Virtual Desktop-related features, like pinning apps to desktops, switching desktops, etc. Unfortunately, most of it is undocumented, and does not seem to be stabilized (2018 Spring Update for instance changed IApplicationView's CLSID, so apps using it stopped working).

34 votes
Sign in
Password icon
Signed in as (Sign out)

We’ll send you updates on this idea

Виктор Милованов shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Password icon
Signed in as (Sign out)
  • Scott McKay commented  ·   ·  Flag as inappropriate

    I use (which uses to allow setting up keyboard shortcuts to do various operations). That uses the undocumented API to provide way better keyboard shortcuts for managing virtual desktops.

    For example, I use Ctrl+Alt+[1-6] to switch directly to one of the 6 virtual desktops I have.
    Ctrl+Shift+[1-6] to move the current app to a specific virtual desktop.
    Ctrl+Shift+Alt+A to pin an App
    Ctrl+Shift+Alt+W to pin a Window.
    The tray icon also displays the current virtual desktop number.

    These are way faster than doing things via the GUI.

    Would be better if the ability to set these keyboard shortcuts was built-in.

    10.0.17763 broke moving an app to a different virtual desktop and displaying the current desktop in the tray icon due to changes in ids and api/s.

  • Simon Liddington commented  ·   ·  Flag as inappropriate

    I should add I would be quite happy for this all not to be in an API if windows supported / fixed the use cases I have given

  • Simon Liddington commented  ·   ·  Flag as inappropriate

    People go to the effort of working out what is in undocumented APIs for a reason :) Basically that reason is the windows implementation of virtual desktops is very limited compared to what people who like them are used to from other environments. Those who aren't used to them aren't likely to use them anyway! And then windows does some weird things when opening new documents/urls...

    My scenarios that implements using this API:

    1. I want to move my current window to another desktop using a keyboard shortcut (that I can configure myself)

    2. I want to arrange my desktops in a 2-D grid layout instead of a long 1-D line so that getting from desktop 1 to desktop 9 does not require 9 steps when thinking of them as layed out in a visual space and using a keyboard shortcut to switch to the adjacent desktop (shortcut that I can configure myself).

    3. When I click a URL that opens a browser window/tab I do not expect my current desktop to change to a different desktop if there is a browser window open on the current desktop (which it does if the most recently used browser window is on a different desktop). Therefore every time the desktop is changed I need to activate the browser window on that desktop.

    4. When I open a microsoft office document or a pdf document from windows explorer I do not expect my current desktop to change to a different desktop which it does because these operations usually switch to an existing open office program window and open another window on the same desktop. Therefore I need to detect this happening and move the window back to the desktop I was on.
    As many people are complaining about here:

  • Виктор Милованов commented  ·   ·  Flag as inappropriate

    Here's one of my specific scenarios: I am making a tiling window manager, that supports grouping windows into tabs. When user moves a window (third party for me) from the current desktop to some other desktop, I need to hide its tab on the current desktop. For that I need to:

    1. be notified when window changes desktop. Currently, I resort to polling all windows using timer and IVirtualDesktopManager.GetWindowDesktopId
    2. be notified when user switches desktop to refresh layouts and render manager specific animations. Alternatively, I need to know when a new desktop is created/deleted so instead of refreshing my UI I could create an instance of UI per desktop (less efficient though). Currently, I am using undocumented IVirtualDesktopNotification interface. That functionality is breaking in 17661, because IVirtualDesktop, that is passes to the callback changed CLSID too.

Feedback and Knowledge Base