@unrud: Your script causes the screen to get re-locked on the first attempt at unlocking, but it unlocks and the mouse pointer shows up on the second attempt.
@unrud: Your script causes the screen to get re-locked on the first attempt at unlocking, but it unlocks and the mouse pointer shows up on the second attempt.