window: Update modifier state directly after receiving a modifier event