[Bf-blender-cvs] [d75e45d10cb] master: Fix T88812: Child Windows on Vertical Monitors

Harley Acheson noreply at git.blender.org
Fri Jun 11 23:40:11 CEST 2021


Commit: d75e45d10cbf7d93742f8c746cdb61de32edb42b
Author: Harley Acheson
Date:   Fri Jun 11 14:39:19 2021 -0700
Branches: master
https://developer.blender.org/rBd75e45d10cbf7d93742f8c746cdb61de32edb42b

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

===================================================================

M	source/blender/windowmanager/intern/wm_window.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index f55dc886950..6aedfb10dde 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. */



More information about the Bf-blender-cvs mailing list