[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21898] branches/blender2.5/blender/intern /ghost/intern/GHOST_WindowWin32.cpp: Windows: fixing user preference window opening full screen
Daniel Genrich
daniel.genrich at gmx.net
Sat Jul 25 22:16:56 CEST 2009
Revision: 21898
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21898
Author: genscher
Date: 2009-07-25 22:16:56 +0200 (Sat, 25 Jul 2009)
Log Message:
-----------
Windows: fixing user preference window opening full screen
Modified Paths:
--------------
branches/blender2.5/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
Modified: branches/blender2.5/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- branches/blender2.5/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2009-07-25 20:01:41 UTC (rev 21897)
+++ branches/blender2.5/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2009-07-25 20:16:56 UTC (rev 21898)
@@ -117,18 +117,34 @@
m_maxPressure(0)
{
if (state != GHOST_kWindowStateFullScreen) {
+ RECT rect;
+ GHOST_TUns32 tw, th;
+
+ width += GetSystemMetrics(SM_CXSIZEFRAME)*2;
+ height += GetSystemMetrics(SM_CYSIZEFRAME)*2 + GetSystemMetrics(SM_CYCAPTION);
+
// take taskbar into account
- RECT rect;
SystemParametersInfo(SPI_GETWORKAREA,0,&rect,0);
- height = rect.bottom - rect.top;
- width = rect.right - rect.left;
+ th = rect.bottom - rect.top;
+ tw = rect.right - rect.left;
+ if(tw < width)
+ {
+ width = tw;
+ left = rect.left;
+ }
+ if(th < height)
+ {
+ height = th;
+ top = rect.top;
+ }
+
m_hWnd = ::CreateWindow(
s_windowClassName, // pointer to registered class name
title, // pointer to window name
WS_OVERLAPPEDWINDOW, // window style
- rect.left, // horizontal position of window
- rect.top, // vertical position of window
+ left, // horizontal position of window
+ top, // vertical position of window
width, // window width
height, // window height
0, // handle to parent or owner window
More information about the Bf-blender-cvs
mailing list