Only grab mouse when there is input focus.