api: prevent focus lossage, hopefully