webscreens / screen-enumeration

Screen enumeration API explainer
Apache License 2.0
23 stars 4 forks source link

What is the primary screen? #21

Closed markafoltz closed 4 years ago

markafoltz commented 4 years ago

Following up on the previous issue, Macs allow the user to designate any monitor as the "primary" monitor, which has the launcher and menu bar.

This primary monitor may be physically to the left/right/above/below any other monitor as arranged in the display preferences.

Is the Mac's view of the primary monitor the one used by the Screen Enumeration API? Or is the primary monitor always intended to be the upper-left monitor in the physical arrangement?

michaelwasserman commented 4 years ago

I believe the scheme you described for Mac OS is also used on Linux and Windows, and that's what should be reflected by this API. The screen designated as primary by the OS/WM would yield true for Screen.primary, and should yield 0 for Screen.top and Screen.left. Other screens would have non-0 (positive or negative) left and top values, representing their offset from the primary screen's origin, and thus describing the overall relative virtual arrangement of screens in the extended desktop environment. I'll try to make sure this is clear in the explainer.

michaelwasserman commented 4 years ago

Some Window Managers (I believe I saw this on Linux) may use a multi-screen origin distinct from the primary screen's origin, but the basic premise of a "primary" screen designated by the operating system or window manager, and exposed by this API still seems valid. I believe the updated Window Placement explainer covers these topics adequately, but please let me know if there's more to do.