tweaks to finding focus window and menu position