[Bf-blender-cvs] [97fabc3c1c9] master: Fix T86185: Win32 Multiple Monitor Window Position

Harley Acheson noreply at git.blender.org
Fri Mar 5 03:15:28 CET 2021


Commit: 97fabc3c1c9266e50d6b77efcb2630c38f238589
Author: Harley Acheson
Date:   Thu Mar 4 17:54:46 2021 -0800
Branches: master
https://developer.blender.org/rB97fabc3c1c9266e50d6b77efcb2630c38f238589

Fix T86185: Win32 Multiple Monitor Window Position

Because of D10469 we can now not force child windows onto parent's monitor and allow them to go where they wish.

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

Reviewed by Ray Molenkamp

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

M	intern/ghost/intern/GHOST_WindowWin32.cpp

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

diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index ad5643fcd89..80ded9abd03 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -92,16 +92,11 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
 {
   wchar_t *title_16 = alloc_utf16_from_8((char *)title, 0);
   RECT win_rect = {left, top, (long)(left + width), (long)(top + height)};
-  RECT parent_rect = {0, 0, 0, 0};
 
   // Initialize tablet variables
   memset(&m_wintab, 0, sizeof(m_wintab));
   m_tabletData = GHOST_TABLET_DATA_NONE;
 
-  if (parentwindow) {
-    GetWindowRect(m_parentWindowHwnd, &parent_rect);
-  }
-
   DWORD style = parentwindow ?
                     WS_POPUPWINDOW | WS_CAPTION | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SIZEBOX :
                     WS_OVERLAPPEDWINDOW;
@@ -124,9 +119,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
   MONITORINFOEX monitor;
   monitor.cbSize = sizeof(MONITORINFOEX);
   monitor.dwFlags = 0;
-  GetMonitorInfo(
-      MonitorFromRect(parentwindow ? &parent_rect : &win_rect, MONITOR_DEFAULTTONEAREST),
-      &monitor);
+  GetMonitorInfo(MonitorFromRect(&win_rect, MONITOR_DEFAULTTONEAREST), &monitor);
 
   /* Adjust our requested size to allow for caption and borders and constrain to monitor. */
   AdjustWindowRectEx(&win_rect, WS_CAPTION, FALSE, 0);



More information about the Bf-blender-cvs mailing list