When there are multiple virtual desktops (VDs) open in Windows 10 and a new program is launched or window is opened, what determines where the window goes? Does Windows try to place the window on the current VD? Does Windows try to place the window on the last VD that it opened on? Does Windows try to place the window on the last VD that it was open on (different from the previous sentence)? Do individual programs override Windows?

Here is a case from my recent use illustrating the complexity. I had 3 VDs open:

  • VD 1: RStudio and Notepad++
  • VD 2: TexStudio source viewer (basically a text editor) on the left with a windowed PDF viewer (built-in to TexStudio) on the right
  • VD 3: Firefox, mail, and other junk

I then shut down Windows (after manually closing RStudio, Firefox, and mail) and restarted, and there were still 3 VDs open. Then:

  • I started RStudio while on VD 1. It opened on VD 1.
  • I switched to VD 3 and started Firefox. It opened on VD 3.
  • I switched to VD 2 and started TexStudio. It opened on VD 2.
  • I told TexStudio (still on VD 2) to open its PDF viewer, and that opened on VD 3!

This might be something specific to TexStudio opening a new window while the program is already running, so how windows for newly-opened programs and new windows in open programs are placed may be different. However, I believe that I have seen other cases where the window for a newly-opened program shows up on neither the current VD nor the VD where it was last open (but I cannot reproduce this right now).

Note on duplicates: there are many questions about how to open a program on a specific desktop, but this question asks instead about the mechanism built-in to Windows 10 (and possibly to programs written for Windows 10). This matters because finding solutions to all those other questions requires first understanding the answer to this question.

1 Answer 1


You apparently last opened the PDF viewer on VD 3 and that was still remembered, so it helpfully opened it again in there.

There is no real solution. Since misery loves company, read the post New instances of an application open in incorrect virtual desktop, which has been running from 2015 to today, with lots of criticism of Microsoft but no real solution.

All I can offer are some aids:

  • The project VDesk can make launching programs on a given VD as simple as the command:

    vdesk 2 notepad
  • The project Virtual Desktop Grid Switcher can better organize VDs and adds shortcuts for moving the active window to another desktop (and more).

  • In this answer of mine I created a AutoHotKey script for saving the current configuration of VDs and open windows, and for restoring all open windows to their saved VDs.
  • This does not seem to answer the question. Are you suggesting that the first time an application is opened determines where it will open for the rest of the life of the OS (or until that VD is destroyed, at least)? Oct 19, 2019 at 21:06
  • I will add that those look like very valuable resources (and that my most upvoted answer on Stack Exchange does not answer the question that was asked, either). I was just hoping to learn here about exactly what Windows does. Oct 19, 2019 at 22:55
  • Exactly what Windows does is unknown and in the above linked post it still wasn't understood after 4 years of discussion. This is further complicated by some "user-friendly" applications remembering their last display position. As I said, there is no real solution and the Windows algorithm is too weird to fully explain (I do suspect bugs).
    – harrymc
    Oct 20, 2019 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.