Forum Discussion

shocko's avatar
shocko
Steel Contributor
Oct 22, 2022

Desktop Window Manager Application Windows Location and Recollection

I have laptop with an external HDMI screen connected. I extend my desktop to it thus creating 2 logical monitors. I do the following:

 

  1. I open something like VScode on Monitor 1 then drag it to Monitor 2
  2. I close it
  3. I relaunch it and it automatically goes to monitor 2
  4. I drag it to Monitor 1 then close it
  5. I relaunch it and it automatically goes to monitor 1

So the Desktop Window Manager seems to remember where a process was last launched. Is this configurable in any way? Is there any logic it uses to determine this (process, windowname, combination etc.)? I'd like to better understand this but can't find much information on it.

 

2 Replies

  • Zevhu's avatar
    Zevhu
    Brass Contributor

    When you close an application, Windows often saves its last position. Upon relaunch, the app or Windows attempts to restore the window to this location.

  • SawyerBodhi's avatar
    SawyerBodhi
    Copper Contributor

    Windows remembers window positions based on the process path. You can override the default behavior via the registry key

    HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\WindowMetrics

    or using a third-party tool.