Pause frame updates when the window is minimized (Fixes #1868)