Main: Fix stalling after window-switching.