Index: ../blender/source/blender/windowmanager/intern/wm_window.c =================================================================== --- ../blender/source/blender/windowmanager/intern/wm_window.c (revision 44782) +++ ../blender/source/blender/windowmanager/intern/wm_window.c (working copy) @@ -308,13 +308,6 @@ { GHOST_WindowHandle ghostwin; int scr_w, scr_h, posy; - GHOST_TWindowState initial_state; - - /* when there is no window open uses the initial state */ - if(!CTX_wm_window(C)) - initial_state= initialstate; - else - initial_state= GHOST_kWindowStateNormal; wm_get_screensize(&scr_w, &scr_h); posy= (scr_h - win->posy - win->sizey); @@ -329,7 +322,7 @@ * doesn't work well when AA is initialized, even if not used. */ ghostwin= GHOST_CreateWindow(g_system, title, win->posx, posy, win->sizex, win->sizey, - initial_state, + (GHOST_TWindowState)win->windowstate, GHOST_kDrawingContextTypeOpenGL, 0 /* no stereo */, 0 /* no AA */); @@ -339,7 +332,7 @@ GPU_extensions_init(); /* set the state*/ - GHOST_SetWindowState(ghostwin, initial_state); + GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate); win->ghostwin= ghostwin; GHOST_SetWindowUserData(ghostwin, win); /* pointer back */ @@ -698,6 +691,7 @@ case GHOST_kEventWindowMove: { GHOST_TWindowState state; state = GHOST_GetWindowState(win->ghostwin); + win->windowstate = state; /* win32: gives undefined window size when minimized */ if(state!=GHOST_kWindowStateMinimized) {