diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-06-12 00:39:19 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-09-06 10:27:41 +0300 |
commit | 74ba0f8bd84b743c6957e68fa3da45fc6c243520 (patch) | |
tree | ae53e0d5e26f6660914be2ee234384b6891b10e8 | |
parent | 1341664e48a8d421beb6da9f0632e39a8105d16a (diff) |
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
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 2e9fd1b1b16..7e0a1ec8beb 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -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. */ |