Only move mouse when osu! is open and active

I've been using this as my mouse clicks - tablet pen broke - and I don't
like it working outside of osu!.