window: Reset the cursor pos after switching pages