Fixing 100% CPU load after first mouse move