Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2013-09-11 18:14:18 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2013-09-11 18:14:18 +0400
commitd396bd92ee13a1e996c30b9e49db974e3f7d5198 (patch)
treefa136884410a721715c1f3c67e8f4ca067621e28 /intern
parent9ea032f8e081ed7c5279d012b6c9012531333063 (diff)
Fix [#36702] blenderapplication window position and size
On Windows the system window will be sized an positioned such that Blender screen area lower left corner is at the requested location, and with dimension as requested. Thanks to Alexander N. for reporting and Brecht van Lommel for input.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 10f8a507e35..362a045e5c7 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -178,10 +178,19 @@ GHOST_WindowWin32::GHOST_WindowWin32(
if (state != GHOST_kWindowStateFullScreen) {
RECT rect;
+ int framex = GetSystemMetrics(SM_CXSIZEFRAME);
+ int framey = GetSystemMetrics(SM_CYSIZEFRAME);
+ int caption = GetSystemMetrics(SM_CYCAPTION);
+ width += framex * 2;
+ height += framey * 2 + caption;
+
+ left -= framex;
+ top -= (caption+framey);
+
rect.left = left;
- rect.right = left + width;
+ rect.right = left + width + framex;
rect.top = top;
- rect.bottom = top + height;
+ rect.bottom = top + height + caption - framey;
int wintype = WS_OVERLAPPEDWINDOW;
if (m_parentWindowHwnd != 0)