diff options
author | Ray Molenkamp <github@lazydodo.com> | 2017-10-04 20:44:22 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2017-10-04 20:44:22 +0300 |
commit | 57d7e5b6ee8e8061f964321edec48584fc64ab03 (patch) | |
tree | 3a6e1b0ff1ef2cf79550970eee9956fb903da168 /source/blender/windowmanager | |
parent | 296757804cc2e97a3d95b4e44a6cc5d508e1c345 (diff) |
Fix T42489 and T52936: Loading blend with minimized window results in crash or empty screen on windows.
Reviewed By: @brecht , @sergey
Differential Revision: http://developer.blender.org/D2866
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 9fe215f7712..79078b321da 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -477,8 +477,12 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, const char *title, wm /* store actual window size in blender window */ bounds = GHOST_GetClientBounds(win->ghostwin); - win->sizex = GHOST_GetWidthRectangle(bounds); - win->sizey = GHOST_GetHeightRectangle(bounds); + + /* win32: gives undefined window size when minimized */ + if (GHOST_GetWindowState(win->ghostwin) != GHOST_kWindowStateMinimized) { + win->sizex = GHOST_GetWidthRectangle(bounds); + win->sizey = GHOST_GetHeightRectangle(bounds); + } GHOST_DisposeRectangle(bounds); #ifndef __APPLE__ |