diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-03-05 04:54:46 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-03-05 04:54:46 +0300 |
commit | 97fabc3c1c9266e50d6b77efcb2630c38f238589 (patch) | |
tree | 63a916fbe619686f6037c9d021a1dce3680b1d71 /intern/ghost | |
parent | 57812c7e4f6db8793f4be99d0a1ebf013eb2ed21 (diff) |
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
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
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); |