frame: fix window focus problem