forked from bartvdbraak/blender
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.
This commit is contained in:
parent
9ea032f8e0
commit
d396bd92ee
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user