Fix high cpu usage when minimized and rendering is required