Fix T88812: Child Windows on Vertical Monitors

This patch improves the positioning of child windows when on monitors
that are arranged vertically (any above any other). When calculating a
window position in Ghost coordinates from GL coordinates we were using
monitor height, which can give incorrect values when desktop is taller
than any single monitor. So use desktop height instead.

See D10637 for more details and examples.

Differential Revision: https://developer.blender.org/D10637

Reviewed by Brecht Van Lommel
This commit is contained in:
Harley Acheson 2021-06-11 14:39:19 -07:00
parent bd87ba90e6
commit d75e45d10c
Notes: blender-bot 2023-02-14 11:28:39 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
Referenced by issue #89039, v2.93 > Win10 > Multi Monitor > Dialog windows & Primary Monitor
Referenced by issue #88812, [2.93] Dialogue boxes/Sub windows keep opening in the third screen
Referenced by issue #70313, Blender 2.80 always launches on the secondary monitor
1 changed files with 1 additions and 1 deletions

View File

@ -550,7 +550,7 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm,
}
int scr_w, scr_h;
wm_get_screensize(&scr_w, &scr_h);
wm_get_desktopsize(&scr_w, &scr_h);
int posy = (scr_h - win->posy - win->sizey);
/* Clear drawable so we can set the new window. */