Merge "Update windows before sending a window state change event"