Page MenuHome

Fix T88812: Child Windows on Multiple Vertical Monitors
ClosedPublic

Authored by Harley Acheson (harley) on Mar 8 2021, 2:23 AM.

Details

Summary

On the Windows platform arranging multiple monitors horizontally works well, but not when arranging vertically (any monitor above or below any other).

This is because in converting from gl coordinates to ghost coordinates we are assuming that the desktop height is the same as the monitor height, and this isn't the case with multiple vertical monitors.

Any monitors that are below the "main" monitor (1080 pixels high for example) have vertical positions that greater than the height of a single monitor (1081 to 2160). Conversely any monitor above the main monitor has negative positioning (-1 to -1080). Any calculation that starts with the height of single monitor is not going to end up with correct values.

In the following capture, main windows in the bottom monitors are trying to open "Properties" but they end up in the monitors above:

This patch just replaces the use of "wm_get_screensize()" for "wm_get_desktopsize() so this calculation uses the proper virtual desktop height. The following shows all four monitors opening nearby child windows:

Note that on Mac and Linux wm_get_desktopsize() just returns the size of the current monitor, which is exactly the same as current behavior so no change and no harm.

Note this also fixes the complaints in T70313

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.Mar 8 2021, 2:23 AM
Harley Acheson (harley) created this revision.
Harley Acheson (harley) retitled this revision from UI: Child Windows on Multiple Vertical Monitors to Fix T88812: Child Windows on Multiple Vertical Monitors.Jun 4 2021, 9:34 PM
Harley Acheson (harley) edited the summary of this revision. (Show Details)
Harley Acheson (harley) edited the summary of this revision. (Show Details)
Harley Acheson (harley) edited the summary of this revision. (Show Details)Jun 5 2021, 2:35 AM
Harley Acheson (harley) edited reviewers, added: Core; removed: User Interface.

Do not add projects as reviewers.... Tag is more than enough.

This revision is now accepted and ready to land.Jun 11 2021, 8:22 PM