[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59986] trunk/blender/intern/ghost/intern/ GHOST_WindowWin32.cpp: Remove dimension checks from window creation.
Nathan Letwory
nathan at letworyinteractive.com
Tue Sep 10 08:35:50 CEST 2013
Revision: 59986
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59986
Author: jesterking
Date: 2013-09-10 06:35:50 +0000 (Tue, 10 Sep 2013)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-09-10 06:32:32 UTC (rev 59985)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-09-10 06:35:50 UTC (rev 59986)
@@ -177,46 +177,12 @@
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)
{
More information about the Bf-blender-cvs
mailing list