Renderer: Resize the window by communicating with the UI thread.