3

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.

Randy Cragun
  • 166
  • 2
  • 10

1 Answers1

3

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.
harrymc
  • 498,455