Fixed shadow map and window event (focus lost, get minimixed and maximized window)