stop and focus handling for windows app