8 Multi-monitor support under Windows

With Windows it is now possible to query the setup object for the number of monitors (.screencount) and the coordinates of the monitors (.screen_x[integer], .screen_y[integer], .screen_width[integer] und .screen_height[integer]). The requested values are dynamic, because one can change the scaling of a monitor or add or remove monitors at any time.

If several monitors are used, they are positioned in a virtual desktop. The coordinates of this virtual desktop can be queried with .vscreen_x, .vscreen_y, .vscreen_width, .vscreen_height. The coordinates of the workspace (without the taskbar) are rendered. The workspaces are included in the calculation of the virtual desktop.

Figure 16-34: relation of .screen_*[] and .vscreen_* attributes

Attention:

If the magnification settings of the monitors differ, please note:

IDM for Windows 11

The values do not appear consistent. Based on the recommended use of .xauto = 1 and .yauto = 1 for windows, the position is converted with the system scaling factor, while the size is converted with the monitor scaling factor. This allows a window to be set to a position and size that fills the entire monitor.
The position and size of the virtual desktop are converted using the system scaling factor. The monitor to which a window that spans several monitors is assigned can depend on the monitor on which the window is currently located. For a defined behavior, coordinates should therefore only be changed in the invisible state.

IDM for Windows 10

Microsoft Windows internally scales applications that are DPI-unaware. In this case, the different scaling factors lead to misrepresentations. To avoid this, either all windows should be opened on the primary monitor only, or all monitors should have the same scaling factor.

Remark for Windows 10 and 11 with several monitors:

In Windows, after adding/removing a monitor or changing the display settings, you may encounter the following problems:

  • No moving frame appears when moving a toolbar object. It can also happen that a rectangle the size of the toolbar frame is displayed with an incorrect background on another monitor.
  • Undocked toolbar objects do not adjust to changes in DPI value. Both when moving to another monitor or changing the magnification.

The problem is due to Windows, which on the one hand incorrectly converts the coordinates when drawing to the desktop and on the other hand does not send important messages (WM_DPICHANGED) to so-called tool windows and does not change the window DPI value.

After the screen saver was active or you logged in again (and after a reboot), the problem no longer occurs.

See also

attributes .screencount, .screen_x[integer], .screen_y[integer], .screen_width[integer], .screen_height[integer], .vscreen_x, .vscreen_y, .vscreen_width, .vscreen_height

Availability

Since IDM version A.06.03.a