This is the bare minimum changes to fix problems positioning child windows when using Multiple Monitors.
The following shows how child windows could be positioned in Blender 291. Middle (main) monitor shown on top is positioned as expected, while left-most monitor (shown bottom left) positions child on middle monitor. Right-most monitor (shown bottom right) positions child on middle monitor.
The following shows child window positioning in blender 293 master. It is improved, as all children are on the same monitor as parent. But left-most monitor (bottom left) positions child too far right. Right-most monitor (bottom right) positions child too far left.
The following shows child window positioning after this patch is applied. Each child positioned correctly in relation to parent no matter which monitor.
This problem is caused by wm_window_check_position() which has flawed logic in order to constrain the new window to monitor bounds as it does not take monitor origins into account. Without origin it can constrain width and height correctly, but cannot constrain positioning. This is because my monitor that is to the left of my main monitor has a horizontal axis that runs from -1919 to -1, and my right-most monitor is 1920 to 3840. Without considering origins, this wm_window_check_position() can only clamp the positions to values inside the monitor dimensions (0-1919).
This patch takes out the positioning constraint and therefore renames the function to wm_window_check_size().
This works perfectly on the Windows platform because the new window is properly constrained for location and size in that ghost code, so no need to do so here. This will have to be tested on Linux and Mac though, to make sure that they they are unable to create windows that are bisected by multiple monitors. If so we will have to create a platform-varying fix.


