From 46db99e7fdec050ffeef49faa05e6d34103217c4 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Tue, 10 Sep 2013 06:35:50 +0000 Subject: [PATCH] Remove dimension checks from window creation. This should be (and is) done by the caller instead (windowmanager) to ensure new windows fit properly on the desktop. Saving stretched layouts and layouts with window over display boundaries now becomes possible on Windows too. --- intern/ghost/intern/GHOST_WindowWin32.cpp | 34 ----------------------- 1 file changed, 34 deletions(-) diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 8290f4ee205..10f8a507e35 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -177,46 +177,12 @@ GHOST_WindowWin32::GHOST_WindowWin32( if (state != GHOST_kWindowStateFullScreen) { RECT rect; - MONITORINFO monitor; - GHOST_TUns32 tw, th; - - width += GetSystemMetrics(SM_CXSIZEFRAME) * 2; - height += GetSystemMetrics(SM_CYSIZEFRAME) * 2 + GetSystemMetrics(SM_CYCAPTION); rect.left = left; rect.right = left + width; rect.top = top; rect.bottom = top + height; - monitor.cbSize = sizeof(monitor); - monitor.dwFlags = 0; - - // take taskbar into account - GetMonitorInfo(MonitorFromRect(&rect, MONITOR_DEFAULTTONEAREST), &monitor); - - th = monitor.rcWork.bottom - monitor.rcWork.top; - tw = monitor.rcWork.right - monitor.rcWork.left; - - if (tw < width) - { - width = tw; - left = monitor.rcWork.left; - } - else if (monitor.rcWork.right < left + (int)width) - left = monitor.rcWork.right - width; - else if (left < monitor.rcWork.left) - left = monitor.rcWork.left; - - if (th < height) - { - height = th; - top = monitor.rcWork.top; - } - else if (monitor.rcWork.bottom < top + (int)height) - top = monitor.rcWork.bottom - height; - else if (top < monitor.rcWork.top) - top = monitor.rcWork.top; - int wintype = WS_OVERLAPPEDWINDOW; if (m_parentWindowHwnd != 0) {