DEV Community

Discussion on: How does Windows detect my external monitor position?

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

It doesn't really detect the position, it detects which displays are connected.

Windows looks at the EDID (extended display identification data) or DisplayID. All displays that implement either of these protocols (which is pretty much everything on the market today using either VGA or a digital video interface) provide a bunch of information, including a manufacturer and product ID, serial number, and rough date of manufacture (week and year). Together, that info can be used to identify specific displays with a very high degree of reliability, which lets Windows remember settings for each display you connect to it independently.

Relative position is a bit more complicated than that though. Windows stores position layouts keyed to which set of displays are connected, not on a per-display basis. So, if you have 3 displays A, B, and C, you can have different position layouts for each combination of two as well as yet another different one for all three being connected. The same is true of all other OSes that remember this type of configuration, as it's really the only sane way to handle it.